diff --git a/README.md b/README.md index f014c03..03863b2 100644 --- a/README.md +++ b/README.md @@ -77,5 +77,5 @@ npm run build ### Lints and fixes files ``` -npm run lint +npm run lint:fix ``` diff --git a/package.json b/package.json index 4324e9a..a8c335a 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,14 @@ }, "private": true, "scripts": { - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "lint": "vue-cli-service lint" + "serve": "vue-cli-service serve --mode development", + "serve:production": "vue-cli-service serve --mode production", + "serve:all": "vue-cli-service serve --host 0.0.0.0 --mode development", + "serve:local": "vue-cli-service serve --host 127.0.0.1 --mode development", + "build": "vue-cli-service build --mode production", + "build:modern": "vue-cli-service build --mode production --modern", + "lint:check": "vue-cli-service lint --no-fix", + "lint:fix": "vue-cli-service lint" }, "dependencies": { "codemirror": "^5.63.0", diff --git a/vue.config.js b/vue.config.js index c500360..1ee6538 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,9 @@ const path = require('path'); +const packageName = process.env.npm_package_name; + +if (packageName) { + process.title = packageName; +} module.exports = { productionSourceMap: false, @@ -17,8 +22,8 @@ module.exports = { // 标题 title: 'Frost 网址导航', // 包含的块 - chunks: ['chunk-common', 'chunk-vendors', 'mainPage'] - } + chunks: ['chunk-common', 'chunk-vendors', 'mainPage'], + }, }, pluginOptions: { @@ -26,12 +31,13 @@ module.exports = { preProcessor: 'less', // 全局 Less 变量 patterns: [ - path.resolve(__dirname, 'src/assets/css/variable.less') - ] - } + path.resolve(__dirname, 'src/assets/css/variable.less'), + ], + }, }, devServer: { - port: 9005 + host: '0.0.0.0', + port: 9005, } };