Skip to content

Commit

Permalink
Create es and commonjs separate build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fuller authored and diasbruno committed Jun 16, 2017
1 parent d024d3a commit d08b96e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ _book
*.diff
examples/__build__
coverage

## Built folders
es
lib
20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "2.0.0",
"description": "Accessible modal dialog component for React.JS",
"main": "./lib/index.js",
"module": "./es/index.js",
"jsnext:main": "./es/index.js",
"repository": {
"type": "git",
"url": "https://github.com/reactjs/react-modal.git"
Expand All @@ -15,19 +17,25 @@
"scripts": {
"start": "./node_modules/.bin/webpack-dev-server --inline --host 127.0.0.1 --content-base examples/",
"test": "cross-env NODE_ENV=test karma start",
"lint": "eslint lib/"
"lint": "eslint lib/",
"clean": "rimraf lib es",
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
"build": "npm run clean && npm run build:commonjs && npm run build:es"
},
"authors": [
"Ryan Florence"
],
"license": "MIT",
"devDependencies": {
"babel-core": "^6.7.4",
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-2": "^6.24.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-env": "^1.5.2",
"babel-preset-react": "^6.24.1",
"codeclimate-test-reporter": "^0.4.0",
"coveralls": "^2.13.1",
"cross-env": "^5.0.1",
Expand Down Expand Up @@ -55,7 +63,7 @@
"react-addons-test-utils": "^15.0.0",
"react-dom": "^15.0.0",
"rf-release": "0.4.0",
"rimraf": "^2.5.4",
"rimraf": "^2.6.1",
"sinon": "next",
"uglify-js": "2.4.24",
"webpack": "^1.12.14",
Expand Down

0 comments on commit d08b96e

Please sign in to comment.