From ca0a1f0773a3a84a781a8bf3277f826fb1a87f4d Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 6 Feb 2018 13:26:04 +0900 Subject: [PATCH] feat: preserve license in c3.min.js (#2283) --- package.json | 2 +- rollup.config.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1e0dfd7..3f17eff 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "npm run build:js && npm run build:css", "build:js": "npm run build:js:rollup && npm run build:js:uglify", "build:js:rollup": "rollup -c > c3.js", - "build:js:uglify": "uglifyjs c3.js --compress --mangle -o c3.min.js", + "build:js:uglify": "uglifyjs c3.js --compress --mangle --comments -o c3.min.js", "build:css": "npm run build:css:sass && npm run build:css:min", "build:css:sass": "node-sass src/scss/main.scss > c3.css", "build:css:min": "cleancss -o c3.min.css c3.css", diff --git a/rollup.config.js b/rollup.config.js index e52d1dc..5969fb5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,10 +1,12 @@ import babel from 'rollup-plugin-babel'; +import pkg from './package.json' export default { input: 'src/index.js', output: { name: 'c3', - format: 'umd' + format: 'umd', + banner: `/* @license C3.js v${pkg.version} | (c) C3 Team and other contributors | http://c3js.org/ */` }, plugins: [babel({ presets: [['es2015', {