Skip to content

Commit

Permalink
feat: compile a modules directory
Browse files Browse the repository at this point in the history
BREAKING CHANGE: lib directory has been renamed cjs
  • Loading branch information
colinmeinke committed Jul 11, 2017
1 parent afe62a8 commit 59b78e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cjs/
dist/
lib/
modules/
node_modules/
npm-debug.log
24 changes: 19 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
"es2015"
]
},
"modules": {
"plugins": [
"transform-object-rest-spread"
],
"presets": [
[
"es2015",
{
"modules": false
}
]
]
},
"test": {
"plugins": [
"transform-object-rest-spread"
Expand Down Expand Up @@ -88,12 +101,13 @@
"svg"
],
"license": "ISC",
"main": "lib/index.js",
"module": "src/index.js",
"main": "cjs/index.js",
"module": "modules/index.js",
"name": "points",
"scripts": {
"build": "npm run build:lib && npm run build:umd",
"build:lib": "BABEL_ENV=cjs babel src --out-dir lib",
"build": "npm run build:modules && npm run build:cjs && npm run build:umd",
"build:cjs": "BABEL_ENV=cjs babel src --out-dir cjs",
"build:modules": "BABEL_ENV=modules babel src --out-dir modules",
"build:umd": "npm run build:umd:dev && npm run build:umd:pro",
"build:umd:dev": "BABEL_ENV=umd rollup -c",
"build:umd:pro": "NODE_ENV=production BABEL_ENV=umd rollup -c",
Expand All @@ -102,7 +116,7 @@
"lint": "standard --verbose | snazzy",
"prepublish": "npm run tidy && npm run build",
"test": "jest",
"tidy": "rimraf lib dist",
"tidy": "rimraf modules cjs dist",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
Expand Down

0 comments on commit 59b78e3

Please sign in to comment.