Skip to content

Commit

Permalink
chore: update builder for new Rollup API
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Jan 12, 2018
1 parent 06ac168 commit 003f050
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ const pkg = require('./package');
const umd = pkg['umd:main'];

rollup({
entry: 'src/index.js',
useStrict: false
strict: false,
input: 'src/index.js'
}).then(bun => {
bun.write({
format: 'cjs',
dest: pkg.main,
file: pkg.main,
exports: 'default'
});

bun.write({
format: 'es',
dest: pkg.module,
file: pkg.module,
exports: 'default'
});

bun.write({
dest:umd,
file:umd,
format: 'umd',
exports: 'default',
moduleName: pkg['umd:name']
name: pkg['umd:name']
}).then(_ => {
const data = fs.readFileSync(umd, 'utf8');
const data = fs.readFileSync(pkg.main, 'utf8');

// produce minified output
const { code } = minify(data, { fromString:true });
Expand Down

0 comments on commit 003f050

Please sign in to comment.