Skip to content

Commit 7e71383

Browse files
authored
Merge pull request #8 from grimmer0125/parcel
Add parcel setting to build CDN bundle for browser script usage
2 parents 82d8c10 + 6af23cc commit 7e71383

File tree

2 files changed

+3562
-91
lines changed

2 files changed

+3562
-91
lines changed

package.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
"name": "@d4c/numjs",
33
"version": "0.17.18",
44
"description": "Like NumPy, in TypeScript and JavaScript",
5+
"source": "src/index.ts",
56
"main": "build/main/index.js",
67
"typings": "build/main/index.d.ts",
78
"module": "build/module/index.js",
9+
"targets": {
10+
"main": false,
11+
"module": {
12+
"context": "browser",
13+
"isLibrary": true,
14+
"sourceMap": false,
15+
"outputFormat": "esmodule",
16+
"includeNodeModules": true
17+
},
18+
"types": false
19+
},
820
"repository": "https://github.com/grimmer0125/numjs",
921
"homepage": "https://grimmer0125.github.io/numjs",
1022
"license": "MIT",
@@ -30,14 +42,16 @@
3042
"mocha": "^9.1.3",
3143
"npm-run-all": "^4.1.5",
3244
"nyc": "^15.1.0",
45+
"parcel": "^2.0.1",
3346
"ts-node": "^10.2.1",
3447
"typedoc": "^0.22.7",
3548
"typescript": "^4.4.2"
3649
},
3750
"scripts": {
38-
"build": "run-p build:*",
51+
"build": "run-s build:parcel build:main build:module",
3952
"build:main": "tsc -p tsconfig.json",
4053
"build:module": "tsc -p tsconfig.module.json",
54+
"build:parcel": "parcel build && mkdir -p dist && mv build/module/index.js dist/numjs.min.js",
4155
"cov:html": "nyc report --reporter=html",
4256
"doc:html": "typedoc src/lib/index.ts src/lib/ndarray.ts src/lib/errors.ts --out build/docs",
4357
"doc:publish": "touch build/docs/.nojekyll && gh-pages -m \"[ci skip] Updates\" -d build/docs -t -r https://github.com/grimmer0125/numjs.git",

0 commit comments

Comments
 (0)