Преглед на файлове

添加是否显示终端donation打印配置

初志鑫 преди 4 години
родител
ревизия
3e6a0cfe9a
променени са 4 файла, в които са добавени 12 реда и са изтрити 10 реда
  1. 5 6
      package.json
  2. 2 0
      src/config/settings.js
  3. 2 0
      src/styles/normalize.scss
  4. 3 4
      vue.config.js

+ 5 - 6
package.json

@@ -8,9 +8,9 @@
     "registry": "https://npm.pkg.github.com/"
   },
   "scripts": {
-    "serve": "npm run helper&&vue-cli-service serve",
-    "build": "npm run helper&&vue-cli-service build",
-    "build:preview": "npm run helper&&vue-cli-service build --mode preview",
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "build:preview": "vue-cli-service build --mode preview",
     "globle": "npm install -g cnpm --registry=https://registry.npm.taobao.org&&cnpm i rimraf npm-check-updates nrm -g&&rimraf node_modules&&cnpm i",
     "lint": "vue-cli-service lint --fix",
     "lint:style": "stylelint **/*.{vue,css,scss} --fix",
@@ -24,8 +24,7 @@
     "svgo": "svgo -f src/remixIcon/svg --config=svgo.yml",
     "push": "start ./push.sh",
     "deploy": "start ./deploy.sh",
-    "increase-memory-limit": "increase-memory-limit",
-    "helper": "node node_modules/zx-layouts"
+    "increase-memory-limit": "increase-memory-limit"
   },
   "repository": {
     "type": "git",
@@ -73,7 +72,7 @@
     "zx-count": "^0.3.7",
     "zx-icon": "^1.1.8",
     "zx-keel": "^0.9.4",
-    "zx-layouts": "^0.6.6",
+    "zx-layouts": "^0.6.7",
     "zx-magnifie": "^0.4.0",
     "zx-markdown-editor": "^0.0.2",
     "zx-player": "^0.9.6",

+ 2 - 0
src/config/settings.js

@@ -96,4 +96,6 @@ module.exports = {
   build7z: false,
   //代码生成机生成在view下的文件夹名称
   templateFolder: "project",
+  //是否显示终端donation打印
+  donation: true,
 };

+ 2 - 0
src/styles/normalize.scss

@@ -1,3 +1,5 @@
+@charset "utf-8";
+
 /*! normalize.scss v0.1.0 | MIT License | based on git.io/normalize */
 
 /**

+ 3 - 4
vue.config.js

@@ -1,3 +1,4 @@
+const { webpackBarName, webpackBanner } = require("zx-layouts");
 const path = require("path");
 const {
   publicPath,
@@ -65,7 +66,7 @@ module.exports = {
       plugins: [
         new Webpack.ProvidePlugin(providePlugin),
         new WebpackBar({
-          name: `\u0076\u0075\u0065\u002d\u0061\u0064\u006d\u0069\u006e\u002d\u0062\u0065\u0061\u0075\u0074\u0069\u0066\u0075\u006c`,
+          name: webpackBarName,
         }),
       ],
     };
@@ -132,9 +133,7 @@ module.exports = {
       });
       config
         .plugin("banner")
-        .use(Webpack.BannerPlugin, [
-          ` \u57fa\u4e8e\u0076\u0075\u0065\u002d\u0061\u0064\u006d\u0069\u006e\u002d\u0062\u0065\u0061\u0075\u0074\u0069\u0066\u0075\u006c\u6784\u5efa \n \u0063\u006f\u0070\u0079\u0072\u0069\u0067\u0068\u0074\u003a\u0020\u0063\u0068\u0075\u007a\u0068\u0069\u0078\u0069\u006e\u0020\u0031\u0032\u0030\u0034\u0035\u0030\u0035\u0030\u0035\u0036\u0040\u0071\u0071\u002e\u0063\u006f\u006d \n \u0074\u0069\u006d\u0065\u003a ${time}`,
-        ])
+        .use(Webpack.BannerPlugin, [`${webpackBanner}${time}`])
         .end();
       config
         .plugin("compression")