Skip to content

Commit

Permalink
fix(package): changes location of ES5M modules
Browse files Browse the repository at this point in the history
Node 10.x changed the file location alg in `require`, so now if there is a folder and a file with the same name it picks the file. In Node 8.x it picks the folder first

Relates to #89
  • Loading branch information
stalniy committed Jul 2, 2018
1 parent 28226c8 commit 2b1ad4e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/casl-ability/extra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "@casl/ability/extra",
"typings": "./extra.d.ts",
"main": "../dist/umd/extra.js",
"module": "../extra.js",
"module": "../dist/es5m/extra.js",
"es2015": "../dist/es6/extra.js"
}
4 changes: 2 additions & 2 deletions packages/casl-ability/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.4.0",
"description": "CASL is an isomorphic authorization JavaScript library which restricts what resources a given user is allowed to access",
"main": "dist/umd/index.js",
"module": "index.js",
"module": "dist/es5m/index.js",
"es2015": "dist/es6/index.js",
"typings": "./index.d.ts",
"repository": {
Expand All @@ -19,7 +19,7 @@
"build.umd": "rollup -c ../../tools/rollup.umd.js -e sift -n casl -g sift:sift",
"build.es5m": "rollup -c ../../tools/rollup.es5m.js -e sift",
"build.extra.es": "rollup -c ../../tools/rollup.es.js -i src/extra.js -o dist/es6/extra.js",
"build.extra.es5m": "rollup -c ../../tools/rollup.es5m.js -i src/extra.js -o extra.js",
"build.extra.es5m": "rollup -c ../../tools/rollup.es5m.js -i src/extra.js -o dist/es5m/extra.js",
"build.extra.umd": "rollup -c ../../tools/rollup.umd.js -i src/extra.js -o dist/umd/extra.js -n casl.extra",
"build.extra": "npm run build.extra.es && npm run build.extra.es5m && npm run build.extra.umd",
"build": "npm run build.es && npm run build.umd && npm run build.es5m && npm run build.extra",
Expand Down
2 changes: 1 addition & 1 deletion packages/casl-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.3.0",
"description": "Angular module for CASL which makes it easy to add permissions in any Angular application",
"main": "dist/umd/index.js",
"module": "index.js",
"module": "dist/es5m/index.js",
"es2015": "dist/es6/index.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/casl-aurelia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.4.0",
"description": "Aurelia plugin for CASL which makes it easy to add permissions in any Aurelia application",
"main": "dist/umd/index.js",
"module": "index.js",
"module": "dist/es5m/index.js",
"es2015": "dist/es6/index.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/casl-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.7.0",
"description": "React component for CASL which makes it easy to add permissions in any React application",
"main": "dist/umd/index.js",
"module": "index.js",
"module": "dist/es5m/index.js",
"es2015": "dist/es6/index.js",
"typings": "./index.d.ts",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/casl-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.4.1",
"description": "Vue plugin for CASL which makes it easy to add permissions in any Vue application",
"main": "dist/umd/index.js",
"module": "index.js",
"module": "dist/es5m/index.js",
"es2015": "dist/es6/index.js",
"typings": "./index.d.ts",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion tools/rollup.es5m.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import config from './rollup.es';

export default Object.assign({}, config, {
output: {
file: 'index.js',
file: 'dist/es5m/index.js',
format: 'es',
},
plugins: config.plugins.concat([
Expand Down

0 comments on commit 2b1ad4e

Please sign in to comment.