Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5dba832

Browse files
committed
vue init
1 parent1b19aea commit5dba832

File tree

14 files changed

+269
-191
lines changed

14 files changed

+269
-191
lines changed

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ selenium-debug.log
1010

1111
# Editor directories and files
1212
.idea
13-
.vscode
1413
*.suo
1514
*.ntvs*
1615
*.njsproj

‎.prettierrc.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports={
2+
// Prettier option here
3+
trailingComma:'es5',// 多行时,尽可能打印尾随的逗号
4+
tabWidth:4,// 会忽略vetur的tabSize配置
5+
useTabs:false,// 是否利用tab替代空格
6+
semi:false,// 句尾是否加;
7+
singleQuote:true,// 使用单引号而不是双引号
8+
arrowParens:'avoid',// allow paren-less arrow functions 箭头函数的参数使用圆括号
9+
}

‎config/index.js‎

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,72 +5,80 @@
55
constpath=require('path')
66

77
module.exports={
8-
dev:{
8+
dev:{
9+
// Paths
10+
assetsSubDirectory:'static',
11+
assetsPublicPath:'/',
12+
proxyTable:{
13+
'/api':{
14+
// 使用"/api"来代替"http://f.apiplus.c"
15+
target:'http://10.40.107.241:8088',// 源地址
16+
changeOrigin:true,// 改变源
17+
pathRewrite:{
18+
'^/api':'http://10.40.107.241:8088',// 路径重写
19+
},
20+
},
21+
},
922

10-
// Paths
11-
assetsSubDirectory:'static',
12-
assetsPublicPath:'/',
13-
proxyTable:{},
23+
// Various Dev Server settings
24+
host:'localhost',// can be overwritten by process.env.HOST
25+
port:8088,// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
26+
autoOpenBrowser:false,
27+
errorOverlay:true,
28+
notifyOnErrors:true,
29+
poll:false,// https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
1430

15-
//Various Dev Server settings
16-
host:'localhost',//canbeoverwritten by process.env.HOST
17-
port:8080,//can be overwritten by process.env.PORT, if port isinuse, a free one will be determined
18-
autoOpenBrowser:false,
19-
errorOverlay:true,
20-
notifyOnErrors:true,
21-
poll:false,// https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
31+
//Use Eslint Loader?
32+
//If true, your code willbelinted during bundling and
33+
//linting errors and warnings will be showninthe console.
34+
useEslint:true,
35+
// Iftrue, eslint errors and warnings will also be shown in the error overlay
36+
// in the browser.
37+
showEslintErrorsInOverlay:false,
2238

23-
// Use Eslint Loader?
24-
// If true, your code will be linted during bundling and
25-
// linting errors and warnings will be shown in the console.
26-
useEslint:true,
27-
// If true, eslint errors and warnings will also be shown in the error overlay
28-
// in the browser.
29-
showEslintErrorsInOverlay:false,
39+
/**
40+
* Source Maps
41+
*/
3042

31-
/**
32-
* Source Maps
33-
*/
43+
// https://webpack.js.org/configuration/devtool/#development
44+
devtool:'cheap-module-eval-source-map',
3445

35-
// https://webpack.js.org/configuration/devtool/#development
36-
devtool:'cheap-module-eval-source-map',
46+
// If you have problems debugging vue-files in devtools,
47+
// set this to false - it *may* help
48+
// https://vue-loader.vuejs.org/en/options.html#cachebusting
49+
cacheBusting:true,
3750

38-
// If you have problems debugging vue-files in devtools,
39-
// set this to false - it *may* help
40-
// https://vue-loader.vuejs.org/en/options.html#cachebusting
41-
cacheBusting:true,
51+
cssSourceMap:true,
52+
},
4253

43-
cssSourceMap:true
44-
},
54+
build:{
55+
// Template for index.html
56+
index:path.resolve(__dirname,'../dist/index.html'),
4557

46-
build:{
47-
// Template for index.html
48-
index:path.resolve(__dirname,'../dist/index.html'),
58+
// Paths
59+
assetsRoot:path.resolve(__dirname,'../dist'),
60+
assetsSubDirectory:'static',
61+
assetsPublicPath:'/',
4962

50-
// Paths
51-
assetsRoot:path.resolve(__dirname,'../dist'),
52-
assetsSubDirectory:'static',
53-
assetsPublicPath:'/',
63+
/**
64+
* Source Maps
65+
*/
5466

55-
/**
56-
* Source Maps
57-
*/
67+
productionSourceMap:true,
68+
// https://webpack.js.org/configuration/devtool/#production
69+
devtool:'#source-map',
5870

59-
productionSourceMap:true,
60-
// https://webpack.js.org/configuration/devtool/#production
61-
devtool:'#source-map',
71+
// Gzip off by default as many popular static hosts such as
72+
// Surge or Netlify already gzip all static assets for you.
73+
// Before setting to `true`, make sure to:
74+
// npm install --save-dev compression-webpack-plugin
75+
productionGzip:false,
76+
productionGzipExtensions:['js','css'],
6277

63-
// Gzip off by default as many popular static hosts such as
64-
// Surge or Netlify already gzip all static assets for you.
65-
// Before setting to `true`, make sure to:
66-
// npm install --save-dev compression-webpack-plugin
67-
productionGzip:false,
68-
productionGzipExtensions:['js','css'],
69-
70-
// Run the build command with an extra argument to
71-
// View the bundle analyzer report after build finishes:
72-
// `npm run build --report`
73-
// Set to `true` or `false` to always turn it on or off
74-
bundleAnalyzerReport:process.env.npm_config_report
75-
}
78+
// Run the build command with an extra argument to
79+
// View the bundle analyzer report after build finishes:
80+
// `npm run build --report`
81+
// Set to `true` or `false` to always turn it on or off
82+
bundleAnalyzerReport:process.env.npm_config_report,
83+
},
7684
}

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"marked":"^1.0.0",
2121
"mavon-editor":"^2.9.0",
2222
"vue":"^2.5.2",
23-
"vue-router":"^3.0.1"
23+
"vue-router":"^3.0.1",
24+
"vuex":"^3.4.0"
2425
},
2526
"devDependencies": {
2627
"autoprefixer":"^7.1.2",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp