From b917e07373095b429aaf106061f927217d10d8e2 Mon Sep 17 00:00:00 2001 From: Dragos Date: Wed, 31 Jul 2019 15:13:38 +0300 Subject: [PATCH] added copyright gulp task --- gulpfile.js | 14 +++++++------- package.json | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index afa66da..d6fcca4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,7 +8,7 @@ const year = "2019", github_MIT_link = "https://github.com/creativetimofficial/vue-material-kit/blob/master/LICENSE.md", product_link = "https://www.creative-tim.com/product/vue-material-kit", - product_free_copyright_template = `/*! + product_copyright_template = `/*! ​ ========================================================= * `+ product_name +` - v`+ product_version +` @@ -27,19 +27,19 @@ const */` gulp.task("licenses", async function() { - // this is to add Creative Tim licenses in the production mode for the minified js + // this is to add Creative Tim licenses in the production & dev mode for the minified js gulp.src(["dist/js/chunk-vendors*.js", "dist/js/app*.js"], { base: "./" }) - .pipe(gap.prependText(product_free_copyright_template)) + .pipe(gap.prependText(product_copyright_template)) .pipe(gulp.dest("./", { overwrite: true })); - // this is to add Creative Tim licenses in the production mode for the minified html + // this is to add Creative Tim licenses in the production & dev mode for the minified html gulp.src("dist/index.html", { base: "./" }) - .pipe(gap.prependText(product_free_copyright_template)) + .pipe(gap.prependText(product_copyright_template)) .pipe(gulp.dest("./", { overwrite: true })); - // this is to add Creative Tim licenses in the production mode for the minified css + // this is to add Creative Tim licenses in the production & dev mode for the minified css gulp.src(["dist/css/chunk-vendors*.css", "dist/app*.css"], { base: "./" }) - .pipe(gap.prependText(product_free_copyright_template)) + .pipe(gap.prependText(product_copyright_template)) .pipe(gulp.dest("./", { overwrite: true })); return; }); diff --git a/package.json b/package.json index 42b8f86..782424e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "private": true, "scripts": { "serve": "vue-cli-service serve --open", - "build": "vue-cli-service build", + "build": "vue-cli-service build && gulp licenses", "lint": "vue-cli-service lint", "dev": "npm run serve", "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm run dev" @@ -26,6 +26,8 @@ "@vue/cli-plugin-eslint": "3.9.2", "@vue/cli-service": "3.9.3", "@vue/eslint-config-prettier": "4.0.1", + "gulp": "4.0.2", + "gulp-append-prepend": "1.0.8", "node-sass": "4.12.0", "sass-loader": "7.1.0", "vue-template-compiler": "2.6.10"