Skip to content

Commit 4a0ca5a

Browse files
committed
Add ES6 module build
1 parent 4d0c376 commit 4a0ca5a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "cyclejs-sortable",
33
"version": "3.0.0",
44
"description": "Makes all children of a vdom-node sortable via drag and drop",
5-
"main": "build/src/makeSortable.js",
6-
"typings": "build/src/makeSortable.d.ts",
5+
"main": "build/cjs/src/makeSortable.js",
6+
"module": "build/es6/src/makeSortable.js",
7+
"typings": "build/cjs/src/makeSortable.d.ts",
8+
"types": "build/cjs/src/makeSortable.d.ts",
79
"lint-staged": {
810
"*.{js,jsx,jsx,ts,tsx}": [
911
"prettier --tab-width 4 --single-quote --write",
@@ -13,7 +15,7 @@
1315
"scripts": {
1416
"precommit": "lint-staged",
1517
"format": "prettier --tab-width 4 --single-quote --write './{examples,src}/**/*.{ts,tsx}'",
16-
"build": "tsc -d",
18+
"build": "tsc -d --outDir 'build/cjs' --module commonjs && tsc -d --outDir 'build/es6' --module es6",
1719
"build:examples": "tsc",
1820
"documentation": "typedoc --out docs src && touch docs/.nojekyll",
1921
"prepublishOnly": "npm run build && npm run documentation && cp-cli examples docs/",

0 commit comments

Comments
 (0)