Skip to content

Commit

Permalink
🔧 Add ESM-es5 build
Browse files Browse the repository at this point in the history
  • Loading branch information
dtinth committed Aug 14, 2018
1 parent 44ec388 commit cfb4044
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"presets": ["env"]
"env": {
"development": {
"presets": ["env"]
},
"production": {
"presets": ["env"]
},
"esm": {
"presets": [["env", { "modules": false }]]
}
}
}
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ sudo: false
node_js:
- "7.0.0"
script:
- webpack --config utils/webpack.config.js
- webpack --config utils/webpack.config.min.js
- npm run build
- npm run build-min
- npm run build-esm
- mocha --compilers js:babel-register --recursive spec
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Javascript Matrix and Vector library for High Performance WebGL apps",
"version": "2.7.1",
"main": "dist/gl-matrix.js",
"module": "src/gl-matrix.js",
"module": "lib/gl-matrix.js",
"homepage": "http://glmatrix.net",
"license": "MIT",
"bugs": {
Expand All @@ -30,9 +30,11 @@
"update-license-version": "node utils/update-license-version.js",
"build": "webpack --config utils/webpack.config.js",
"build-min": "webpack --config utils/webpack.config.min.js",
"build-all": "npm run update-license-version&&npm run build&&npm run build-min"
"build-esm": "BABEL_ENV=esm babel src -d lib",
"build-all": "npm run update-license-version&&npm run build&&npm run build-min&&npm run build-esm"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.7.0",
Expand All @@ -41,8 +43,8 @@
"mocha": "^5.1.1",
"node-libs-browser": "^2.1.0",
"uglifyjs-webpack-plugin": "^1.2.5",
"webpack-cli": "^2.1.3",
"webpack": "^4.8.3"
"webpack": "^4.8.3",
"webpack-cli": "^2.1.3"
},
"dependencies": {},
"sideEffects": false
Expand Down

0 comments on commit cfb4044

Please sign in to comment.