Skip to content

Commit

Permalink
build: upgrade rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Jan 3, 2018
1 parent cb4f3a9 commit 553fe5b
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 67 deletions.
101 changes: 49 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"cpy-cli": "^1.0.1",
"cssnano": "^3.10.0",
"del-cli": "^1.1.0",
"eslint": "^4.13.1",
"eslint": "^4.14.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.8.0",
"node-qunit-phantomjs": "^2.0.0",
Expand All @@ -67,10 +67,10 @@
"postcss-cssnext": "^3.0.2",
"postcss-header": "^1.0.0",
"postcss-url": "^7.3.0",
"rollup": "^0.52.2",
"rollup-plugin-babel": "^3.0.2",
"rollup": "^0.53.3",
"rollup-plugin-babel": "^3.0.3",
"rollup-watch": "^4.3.1",
"stylefmt": "^6.0.0",
"uglify-js": "^3.2.2"
"uglify-js": "^3.3.4"
}
}
29 changes: 18 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,49 @@ const babel = require('rollup-plugin-babel');
const pkg = require('./package');

const now = new Date();
const banner = `/*!
* Cropper.js v${pkg.version}
* https://github.com/${pkg.repository}
*
* Copyright (c) 2015-${now.getFullYear()} ${pkg.author.name}
* Released under the ${pkg.license} license
*
* Date: ${now.toISOString()}
*/
`;

module.exports = {
// Export banner for PostCSS
banner,
input: 'src/js/cropper.js',
output: [
{
banner,
file: 'dist/cropper.js',
format: 'umd',
name: 'Cropper',
},
{
banner,
file: 'dist/cropper.common.js',
format: 'cjs',
},
{
banner,
file: 'dist/cropper.esm.js',
format: 'es',
},
{
banner,
file: 'docs/js/cropper.js',
format: 'umd',
name: 'Cropper',
},
],
name: 'Cropper',
plugins: [
babel({
exclude: 'node_modules/**',
plugins: ['external-helpers'],
}),
],
banner: `/*!
* Cropper.js v${pkg.version}
* https://github.com/${pkg.repository}
*
* Copyright (c) 2015-${now.getFullYear()} ${pkg.author.name}
* Released under the ${pkg.license} license
*
* Date: ${now.toISOString()}
*/
`,
};

0 comments on commit 553fe5b

Please sign in to comment.