Skip to content

Commit bb3ada4

Browse files
committed
build: release modern JS in module/ and es5 in lib/
and use module field in package.json, so that we can avoid breaking changes for now
1 parent 40ee107 commit bb3ada4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[ignore]
22
<PROJECT_ROOT>/lib/.*
3-
<PROJECT_ROOT>/es5/.*
3+
<PROJECT_ROOT>/module/.*
44

55
[include]
66
./src

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ coverage
22
.nyc_output
33
node_modules
44
lib
5-
es5
5+
module
66
.eslintcache

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"version": "0.0.0-development",
44
"description": "my personal ES2015 library project skeleton",
55
"main": "lib/index.js",
6+
"module": "module/index.js",
67
"scripts": {
78
"lint": "eslint src test --cache",
89
"lint:fix": "eslint --fix src test --cache",
910
"lint:watch": "esw --watch src test --cache",
1011
"flow": "flow",
1112
"flow:coverage": "for file in src/**.js test/**.js; do echo $file; flow coverage $file; done",
1213
"flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore lib/ --ignore node_modules/ --watch .flowconfig --watch src/ --watch test/",
13-
"build": "rimraf lib && babel src --out-dir lib && flow-copy-source -v src/ lib && rimraf es5 && BABEL_ENV=es5 babel src --out-dir es5 && flow-copy-source -v src/ es5",
14+
"build": "rimraf module && babel src --out-dir module && flow-copy-source -v src/ module && rimraf lib && BABEL_ENV=es5 babel src --out-dir lib && flow-copy-source -v src/ lib",
1415
"test": "NODE_ENV=production BABEL_ENV=es5 mocha $npm_package_config_mocha && NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
1516
"test:watch": "mocha --watch $npm_package_config_mocha",
1617
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",

0 commit comments

Comments
 (0)