mirror of https://github.com/Lissy93/dashy.git
🔧 Removes sourcecode banner from vue config
This commit is contained in:
parent
94927cd880
commit
1cf4d61e88
|
@ -55,8 +55,7 @@
|
||||||
"sass": "^1.18.0",
|
"sass": "^1.18.0",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"vue-svg-loader": "^0.16.0",
|
"vue-svg-loader": "^0.16.0",
|
||||||
"vue-template-compiler": "^2.6.10",
|
"vue-template-compiler": "^2.6.10"
|
||||||
"webpack": "4.0.0"
|
|
||||||
},
|
},
|
||||||
"gitHooks": {
|
"gitHooks": {
|
||||||
"pre-commit": "yarn lint"
|
"pre-commit": "yarn lint"
|
||||||
|
@ -90,4 +89,4 @@
|
||||||
"> 1%",
|
"> 1%",
|
||||||
"last 2 versions"
|
"last 2 versions"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -2,23 +2,10 @@
|
||||||
* Global config for the main Vue app. ES7 not supported here.
|
* Global config for the main Vue app. ES7 not supported here.
|
||||||
* See docs for all config options: https://cli.vuejs.org/config
|
* See docs for all config options: https://cli.vuejs.org/config
|
||||||
*/
|
*/
|
||||||
const webpack = require('webpack');
|
|
||||||
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
||||||
|
|
||||||
// Get current version
|
// Get current version
|
||||||
const { version } = require('./package.json');
|
process.env.VUE_APP_VERSION = require('./package.json');
|
||||||
|
|
||||||
// Set the current version, for use within the app
|
|
||||||
process.env.VUE_APP_VERSION = version;
|
|
||||||
|
|
||||||
// Make banner text, for output files
|
|
||||||
const banner = (() => {
|
|
||||||
const now = new Date();
|
|
||||||
const line1 = `Dashy ${version}. Built at ${now.toLocaleTimeString()} on ${now.toLocaleDateString()}`;
|
|
||||||
const line2 = `Licensed under MIT - (C) Alicia Sykes ${now.getFullYear()}`;
|
|
||||||
const line3 = 'Code + docs: https://github.com/lissy93/dashy';
|
|
||||||
return `${line1}\n${line2}\n${line3}`;
|
|
||||||
})();
|
|
||||||
|
|
||||||
// Specify and export the main Vue app config
|
// Specify and export the main Vue app config
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -37,8 +24,6 @@ module.exports = {
|
||||||
plugins: [
|
plugins: [
|
||||||
// Display progress bar while building
|
// Display progress bar while building
|
||||||
new ProgressBarPlugin(),
|
new ProgressBarPlugin(),
|
||||||
// Insert banner into output chunks
|
|
||||||
new webpack.BannerPlugin({ banner }),
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// Specify resources for PWA / mobile support
|
// Specify resources for PWA / mobile support
|
||||||
|
|
Loading…
Reference in New Issue