Browse Source

Get module name from package.json

rollup
Luke Childs 8 years ago
parent
commit
55ee17f2aa
  1. 1
      package.json
  2. 3
      rollup.config.js

1
package.json

@ -53,6 +53,7 @@
"babel-plugin-array-includes": "^2.0.3", "babel-plugin-array-includes": "^2.0.3",
"babel-plugin-transform-es2015-arrow-functions": "^6.22.0", "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
"browser-env": "^2.0.19", "browser-env": "^2.0.19",
"camelcase": "^4.0.0",
"coveralls": "^2.11.15", "coveralls": "^2.11.15",
"jsdom": "^9.9.1", "jsdom": "^9.9.1",
"nyc": "^10.0.0", "nyc": "^10.0.0",

3
rollup.config.js

@ -1,4 +1,5 @@
import babel from 'rollup-plugin-babel'; import babel from 'rollup-plugin-babel';
import camelCase from 'camelcase';
const pkg = require('./package.json'); const pkg = require('./package.json');
@ -11,7 +12,7 @@ export default {
{ {
dest: pkg.main, dest: pkg.main,
format: 'umd', format: 'umd',
moduleName: 'whenDomReady', moduleName: camelCase(pkg.name),
sourceMap: true sourceMap: true
}, },
{ {

Loading…
Cancel
Save