Skip to content

Commit cdcd3e9

Browse files
committed
feat: publish both CJS and ESM to npm
also stop publishing source maps
1 parent 647a498 commit cdcd3e9

File tree

3 files changed

+43
-24
lines changed

3 files changed

+43
-24
lines changed

package-lock.json

Lines changed: 34 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "avr8js",
33
"version": "0.4.0",
4-
"main": "dist/index.js",
5-
"typings": "dist/index.d.ts",
4+
"main": "dist/cjs/index.js",
5+
"module": "./dist/esm/index.js",
6+
"types": "./dist/esm/index.d.ts",
67
"author": "Uri Shaked <[email protected]>",
78
"repository": "https://github.com/wokwi/avr8js",
89
"license": "MIT",
910
"scripts": {
10-
"build": "rimraf dist && tsc",
11+
"build": "rimraf dist && tsc --sourceMap false && tsc -m commonjs --outDir dist/cjs --sourceMap false",
1112
"build:demo": "parcel build demo/src/index.html -d demo/dist",
1213
"prepare": "npm run build",
1314
"start": "parcel demo/src/index.html -d demo/build",
@@ -24,7 +25,7 @@
2425
"@types/jest": "^24.0.23",
2526
"@types/node": "^12.12.7",
2627
"@types/prettier": "^1.19.0",
27-
"@wokwi/elements": "^0.1.0",
28+
"@wokwi/elements": "^0.1.1",
2829
"husky": "^3.0.9",
2930
"jest": "^24.9.0",
3031
"lint-staged": "^9.4.2",

tsconfig.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
4-
"module": "commonjs",
3+
"target": "ES2015",
4+
"module": "ES2015",
55
"moduleResolution": "node",
66
"noImplicitAny": true,
77
"removeComments": false,
88
"sourceMap": true,
99
"declaration": true,
10-
"newLine": "LF",
1110
"noEmitOnError": true,
1211
"rootDir": "src",
13-
"outDir": "dist",
14-
"lib": ["es2015"],
12+
"outDir": "dist/esm",
13+
"lib": ["es2015"]
1514
},
1615
"include": ["src/**/*.ts"],
1716
"exclude": ["src/**/*.spec.ts"]

0 commit comments

Comments
 (0)