Skip to content

Commit 9a0c31f

Browse files
committed
switch to CommonJS and change declaration system
1 parent c9524ba commit 9a0c31f

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.gitignore
77
tsconfig.json
88
.eslintrc
9-
distDeletor.js
9+
distDeletor.mjs
1010

1111
# Hidden folders
1212
/.vscode
File renamed without changes.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"version": "0.0.1-alpha",
44
"description": "Compiler used to compile Syntax Script projects.",
55
"main": "dist/index.js",
6-
"types": "dist/types.d.ts",
6+
"types": "dist/index.d.ts",
77
"scripts": {
88
"lint": "eslint ./src/**/*.ts",
9-
"prebuild": "npm run lint && node distDeletor.js",
9+
"prebuild": "npm run lint && node distDeletor.mjs",
1010
"build": "tsc",
11-
"postbuild": "cls && dts-bundle-generator src/index.ts -o dist/types.d.ts && echo Builded",
11+
"postbuild": "cls && echo Builded",
1212
"prepack": "npm run build"
1313
},
1414
"repository": {
@@ -40,6 +40,5 @@
4040
"@typescript-eslint/parser": "^7.4.0",
4141
"eslint": "^8.57.0",
4242
"eslint-plugin-jsdoc": "^48.2.3"
43-
},
44-
"type": "module"
43+
}
4544
}

tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"compilerOptions": {
3-
"module": "NodeNext",
3+
"module": "CommonJS",
44
"rootDir": "./src",
55
"outDir": "./dist",
6-
"moduleResolution": "nodenext",
6+
"moduleResolution": "Classic",
77
"target": "ESNext",
88
"skipLibCheck": true,
9-
"allowUnreachableCode": false
9+
"allowUnreachableCode": false,
10+
"declaration": true,
11+
"declarationMap": true
1012
},
1113
"exclude": ["./syx/**/*"],
1214
"include": ["./src"]

0 commit comments

Comments
 (0)