Skip to content

Commit

Permalink
Adapted build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo-ter-Doest committed May 30, 2024
1 parent 5e3de16 commit 95f8e3b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@
},
"scripts": {
"benchmark": "node benchmarks",
"build": "tsc && ncp spec/test_data dist",
"build": "npm run build:tests & npm run build:esm",
"build:esm": "rollup -c",
"build:tests": "tsc",
"clean": "rimraf *~ #* *classifier.json dist io_spec/tmp/*.json coverage",
"test_io": "jasmine --random=false io_spec/*_spec.js",
"test": "cross-env NODE_PATH=.:./dist jasmine --random=false dist/spec/*_spec.js",
"test": "cross-env NODE_PATH=. jasmine --random=false dist/cjs/spec/*_spec.js",
"coverage": "nyc --no-clean npm run test && nyc --no-clean npm run test_io",
"test_browser": "cross-env NODE_PATH=. node ./node_modules/gulp/bin/gulp.js",
"lint": "eslint . --ext .ts",
"build_esm": "rollup -c"
"lint": "eslint . --ext .ts"
},
"license": "MIT",
"author": "Chris Umbel <[email protected]>",
Expand Down
1 change: 1 addition & 0 deletions spec/test_esm_bundle/test_imports.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import natural from '../../dist/esm/index.js'
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
"baseUrl": "./",
"moduleResolution": "node",
"allowJs": true,
"outDir": "./dist",
"outDir": "./dist/cjs",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true
},
"include": [
"lib/natural/**/*.ts",
"spec/*.ts",
"io_spec/*.ts"
, "lib/natural/analyzers/SenType.ts" ],
"io_spec/*.ts",
"lib/natural/analyzers/SenType.ts"
],
"exclude": [
"./node_modules"
]
Expand Down

0 comments on commit 95f8e3b

Please sign in to comment.