From bc4fd52065fd1d12e07b02252f21e5c20af50eec Mon Sep 17 00:00:00 2001 From: cdswyda Date: Fri, 7 May 2021 10:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E7=BB=93=E6=9E=9C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=89=88=E6=9C=AC=E7=AD=89banner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index c5d2f2b..c83ef71 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -32,6 +32,13 @@ const babel = require('@rollup/plugin-babel').default; // Distinguish development and production environments const production = process.env.NODE_ENV === 'production' ? true : false; +const pkg = require('./package.json'); +const banner = `/*! @preserve + * ${pkg.name} + * version: ${pkg.version} + * https://github.com/mengshukeji/Luckysheet + */`; + // uglify js Compression configuration https://github.com/mishoo/UglifyJS#minify-options const uglifyOptions = { compress: { @@ -192,7 +199,7 @@ async function core() { name: 'luckysheet', sourcemap: true, inlineDynamicImports:true, - + banner: banner }); if(production){ @@ -202,6 +209,7 @@ async function core() { name: 'luckysheet', sourcemap: true, inlineDynamicImports:true, + banner: banner }); }