feat: change to use commonjs output

This commit is contained in:
Lin, Hung-Shin authored and wancat committed 2024-01-29 12:42:50 +08:00
1 parent 2bdb804f24
commit 557af91d4b
24 files changed
+35 -18

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@linux-odyssey/file-graph",
"version": "1.0.0",
"type": "module",
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"scripts": {
"build": "tsc && node post-build-script.js",
"build": "tsc",
"test": "yarn build && jest"
}
}
@@ -1,6 +1,4 @@
import { describe, expect, test } from '@jest/globals'
import File from './file'
import File from '../src/file'
describe('File', () => {
let file
@@ -1,5 +1,5 @@
import FileGraph from './fileGraph'
import FileNode from './fileNode'
import FileGraph from '../src/fileGraph'
import FileNode from '../src/fileNode'
describe('FileGraph', () => {
let root
@@ -1,5 +1,5 @@
import { DuplicateItemError, ParentNotExistsError } from './errors'
import FileNode from './fileNode'
import { DuplicateItemError, ParentNotExistsError } from '../src/errors'
import FileNode from '../src/fileNode'
function createNodeFromFiles(files) {
const node = new FileNode(files[0])
+2 -2
View File
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"target": "ES5",
"module": "CommonJS",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,