sale-client 3.4.114 → 3.4.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.project +11 -11
  4. package/README.md +38 -38
  5. package/build/css-loaders.js +34 -34
  6. package/build/dev-client.js +8 -8
  7. package/build/dev-server.js +2 -2
  8. package/build/release.sh +28 -28
  9. package/build/utils.js +71 -71
  10. package/build/webpack.dev.conf.js +31 -31
  11. package/build/webpack.example.conf.js +49 -49
  12. package/build/webpack.test.conf.js +31 -31
  13. package/config/dev.env.js +6 -6
  14. package/config/index.js +38 -38
  15. package/config/prod.env.js +3 -3
  16. package/config/test.env.js +6 -6
  17. package/examples/ReadCard/index.html +11 -11
  18. package/package.json +2 -2
  19. package/release.bat +5 -5
  20. package/sale-client.iml +8 -8
  21. package/src/assets/binding.svg +1 -1
  22. package/src/assets/unbind.svg +1 -1
  23. package/src/assets//345/205/254/345/221/212.svg +1 -1
  24. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  25. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  26. package/src/components/FilesManage/MeterinfoTest.vue +0 -1
  27. package/src/components/FilesManage/UserDeviceInfoTest.vue +371 -370
  28. package/src/components/FilesManage/UserGeneralInfoTest.vue +4 -2
  29. package/src/components/Hello.vue +39 -39
  30. package/src/components/List.vue +51 -51
  31. package/src/components/SellGasCharge/FakaList.vue +23 -23
  32. package/src/components/UserFiles/admissibility.vue +46 -46
  33. package/src/components/chargeNew/thirdSurplus.vue +2 -0
  34. package/src/components/getNowDate.js +25 -25
  35. package/src/components/revenue/HandManager/MbpeopleList.vue +492 -492
  36. package/src/components/revenue/bank/BankDocking.vue +62 -62
  37. package/src/components/revenue/base/CardServer/CardInfoModal.vue +52 -52
  38. package/src/components/revenue/base/rightview/carddetail/StopApplyDetail.vue +70 -70
  39. package/src/components/revenue/comprehen/CardManage/CardManage.vue +83 -83
  40. package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/NoMessage.vue +30 -30
  41. package/src/components/revenue/comprehen/ComprehenOperation/ComprehenSearch.vue +13 -13
  42. package/src/components/revenue/comprehen/ComprehenOperation/FeeDeduction/feeDeduction.vue +1 -1
  43. package/src/components/revenue/comprehen/ComprehenOperation/removeTable.vue +1 -1
  44. package/src/components/revenue/comprehen/Maintenance/revenue/StockListmain.vue +7 -7
  45. package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackList.vue +1 -1
  46. package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackListManage.vue +1 -1
  47. package/src/components/revenue/comprehen/TotalSplit/TotalSplitManage.vue +45 -45
  48. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +6 -0
  49. package/src/filiale/macheng/UserEssentialInfoTest.vue +368 -368
  50. package/src/filiale/meihekou/MeterinfoTest.vue +0 -1
  51. package/src/filiale/qianneng/FilesManage/MeterinfoTest.vue +0 -1
  52. package/src/filiale/qianneng/OtherChargeNew.vue +6 -2
  53. package/src/filiale/qingtongxia/UserGeneralInfoTest.vue +6 -1
  54. package/src/filiale/tongchuan/feeDeduction.vue +12 -0
  55. package/src/main.js +23 -23
  56. package/src/plugins/CardListen.js +29 -29
  57. package/src/plugins/CardManageService.js +21 -21
  58. package/src/plugins/SelectService.js +41 -41
  59. package/src/project/ProjectPage.vue +24 -24
  60. package/src/project/State.js +17 -17
  61. package/test/e2e/custom-assertions/elementCount.js +26 -26
  62. package/test/e2e/nightwatch.conf.js +40 -40
  63. package/test/e2e/runner.js +30 -30
  64. package/test/e2e/specs/test.js +13 -13
  65. package/test/unit/.eslintrc +5 -5
  66. package/test/unit/context.html +20 -20
  67. package/test/unit/index.js +13 -13
  68. package/test/unit/init.js +13 -13
  69. package/test/unit/karma.conf.js +55 -55
  70. package/test/unit/specs/components/UserFiles/AreaList.spec.js +25 -25
  71. package/test/unit/specs/components/UserFiles/UserFiles.spec.js +22 -22
  72. package/test/unit/specs/components/UserFiles/UserGeneralInfo.spec.js +55 -55
  73. package/test/unit/specs/components/revenue/Common/ReissueBill.spec.js +29 -29
  74. package/test/unit/specs/components/revenue/base/CardServer/ReadCard.spec.js +23 -23
  75. package/test/unit/specs/components/revenue/base/UserList.spec.js +21 -21
  76. package/test/unit/specs/components/revenue/base/rightview/CardList.spec.js +29 -29
  77. package/test/unit/specs/components/revenue/todoList/ToDoListManage.spec.js +20 -20
  78. package/test/unit/specs/service/delete.spec.js +8 -8
  79. package/test/unit/specs/service/getSaleInitData.spec.js +16 -16
  80. package/test/unit/specs/service/uploadFile.spec.js +8 -8
  81. package/.gradle/3.5/file-changes/last-build.bin +0 -0
  82. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  83. package/.gradle/buildOutputCleanup/built.bin +0 -0
  84. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  85. package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
package/.babelrc CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "presets": ["es2015", "stage-2"],
3
- "plugins": ["transform-runtime"],
4
- "comments": false
5
- }
1
+ {
2
+ "presets": ["es2015", "stage-2"],
3
+ "plugins": ["transform-runtime"],
4
+ "comments": false
5
+ }
package/.editorconfig CHANGED
@@ -1,9 +1,9 @@
1
- root = true
2
-
3
- [*]
4
- charset = utf-8
5
- indent_style = space
6
- indent_size = 2
7
- end_of_line = lf
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
package/.project CHANGED
@@ -1,11 +1,11 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <projectDescription>
3
- <name>SaleClient</name>
4
- <comment></comment>
5
- <projects>
6
- </projects>
7
- <buildSpec>
8
- </buildSpec>
9
- <natures>
10
- </natures>
11
- </projectDescription>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>SaleClient</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ </buildSpec>
9
+ <natures>
10
+ </natures>
11
+ </projectDescription>
package/README.md CHANGED
@@ -1,39 +1,39 @@
1
- # sale-client
2
-
3
- #### 项目介绍
4
- {**以下是码云平台说明,您可以替换为您的项目简介**
5
- 码云是开源中国推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
6
- 无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
7
-
8
- #### 软件架构
9
- 软件架构说明
10
-
11
-
12
- #### 安装教程
13
-
14
- 1. xxxx
15
- 2. xxxx
16
- 3. xxxx
17
-
18
- #### 使用说明
19
-
20
- 1. xxxx
21
- 2. xxxx
22
- 3. xxxx
23
-
24
- #### 参与贡献
25
-
26
- 1. Fork 本项目
27
- 2. 新建 Feat_xxx 分支
28
- 3. 提交代码
29
- 4. 新建 Pull Request
30
-
31
-
32
- #### 码云特技
33
-
34
- 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
35
- 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
36
- 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
37
- 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
38
- 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
1
+ # sale-client
2
+
3
+ #### 项目介绍
4
+ {**以下是码云平台说明,您可以替换为您的项目简介**
5
+ 码云是开源中国推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
6
+ 无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
7
+
8
+ #### 软件架构
9
+ 软件架构说明
10
+
11
+
12
+ #### 安装教程
13
+
14
+ 1. xxxx
15
+ 2. xxxx
16
+ 3. xxxx
17
+
18
+ #### 使用说明
19
+
20
+ 1. xxxx
21
+ 2. xxxx
22
+ 3. xxxx
23
+
24
+ #### 参与贡献
25
+
26
+ 1. Fork 本项目
27
+ 2. 新建 Feat_xxx 分支
28
+ 3. 提交代码
29
+ 4. 新建 Pull Request
30
+
31
+
32
+ #### 码云特技
33
+
34
+ 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
35
+ 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
36
+ 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
37
+ 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
38
+ 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
39
39
  6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
@@ -1,34 +1,34 @@
1
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
2
-
3
- module.exports = function (options) {
4
- // generate loader string to be used with extract text plugin
5
- function generateLoaders (loaders) {
6
- var sourceLoader = loaders.map(function (loader) {
7
- var extraParamChar
8
- if (/\?/.test(loader)) {
9
- loader = loader.replace(/\?/, '-loader?')
10
- extraParamChar = '&'
11
- } else {
12
- loader = loader + '-loader'
13
- extraParamChar = '?'
14
- }
15
- return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
16
- }).join('!')
17
-
18
- if (options.extract) {
19
- return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
20
- } else {
21
- return ['vue-style-loader', sourceLoader].join('!')
22
- }
23
- }
24
-
25
- // http://vuejs.github.io/vue-loader/configurations/extract-css.html
26
- return {
27
- css: generateLoaders(['css']),
28
- less: generateLoaders(['css', 'less']),
29
- sass: generateLoaders(['css', 'sass?indentedSyntax']),
30
- scss: generateLoaders(['css', 'sass']),
31
- stylus: generateLoaders(['css', 'stylus']),
32
- styl: generateLoaders(['css', 'stylus'])
33
- }
34
- }
1
+ var ExtractTextPlugin = require('extract-text-webpack-plugin')
2
+
3
+ module.exports = function (options) {
4
+ // generate loader string to be used with extract text plugin
5
+ function generateLoaders (loaders) {
6
+ var sourceLoader = loaders.map(function (loader) {
7
+ var extraParamChar
8
+ if (/\?/.test(loader)) {
9
+ loader = loader.replace(/\?/, '-loader?')
10
+ extraParamChar = '&'
11
+ } else {
12
+ loader = loader + '-loader'
13
+ extraParamChar = '?'
14
+ }
15
+ return loader + (options.sourceMap ? extraParamChar + 'sourceMap' : '')
16
+ }).join('!')
17
+
18
+ if (options.extract) {
19
+ return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
20
+ } else {
21
+ return ['vue-style-loader', sourceLoader].join('!')
22
+ }
23
+ }
24
+
25
+ // http://vuejs.github.io/vue-loader/configurations/extract-css.html
26
+ return {
27
+ css: generateLoaders(['css']),
28
+ less: generateLoaders(['css', 'less']),
29
+ sass: generateLoaders(['css', 'sass?indentedSyntax']),
30
+ scss: generateLoaders(['css', 'sass']),
31
+ stylus: generateLoaders(['css', 'stylus']),
32
+ styl: generateLoaders(['css', 'stylus'])
33
+ }
34
+ }
@@ -1,8 +1,8 @@
1
- require('eventsource-polyfill')
2
- var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
3
-
4
- hotClient.subscribe(function (event) {
5
- if (event.action === 'reload') {
6
- window.location.reload()
7
- }
8
- })
1
+ require('eventsource-polyfill')
2
+ var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
3
+
4
+ hotClient.subscribe(function (event) {
5
+ if (event.action === 'reload') {
6
+ window.location.reload()
7
+ }
8
+ })
@@ -12,7 +12,7 @@ var compiler = webpack(config)
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
13
  var bendi = 'http://127.0.0.1:8080/',bendi1 = 'http://119.146.1.106:8300/'
14
14
  // 公司测试服务
15
- var fuwu = 'http://121.36.106.17:8400/'
15
+ var fuwu = 'http://183.67.41.139:8400/'
16
16
  //铜川正式
17
17
  // var fuwu = 'http://61.134.55.234:9999/'
18
18
  //铜川测试
@@ -95,7 +95,7 @@ var proxyTable = {
95
95
  },
96
96
  '/rs': {
97
97
  // target: 'http://192.168.30.63:8081/'
98
- target: fuwu
98
+ target: 'http://183.67.41.139:8400/'
99
99
  // target:fuwu
100
100
  }
101
101
  }
package/build/release.sh CHANGED
@@ -1,28 +1,28 @@
1
- set -e
2
- echo "Enter release version: "
3
- read VERSION
4
-
5
- read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6
- echo # (optional) move to a new line
7
- if [[ $REPLY =~ ^[Yy]$ ]]
8
- then
9
- echo "Releasing $VERSION ..."
10
-
11
- # lint
12
- npm run lint 2>/dev/null
13
-
14
- # e2e
15
- npm run e2e 2>/dev/null
16
-
17
- #build
18
- npm run build
19
-
20
- # commit
21
- git add -A
22
- git commit -m "[build] $VERSION"
23
- npm version $VERSION --message "[release] $VERSION"
24
-
25
- # publish
26
- git push origin refs/tags/v$VERSION
27
- git push
28
- fi
1
+ set -e
2
+ echo "Enter release version: "
3
+ read VERSION
4
+
5
+ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6
+ echo # (optional) move to a new line
7
+ if [[ $REPLY =~ ^[Yy]$ ]]
8
+ then
9
+ echo "Releasing $VERSION ..."
10
+
11
+ # lint
12
+ npm run lint 2>/dev/null
13
+
14
+ # e2e
15
+ npm run e2e 2>/dev/null
16
+
17
+ #build
18
+ npm run build
19
+
20
+ # commit
21
+ git add -A
22
+ git commit -m "[build] $VERSION"
23
+ npm version $VERSION --message "[release] $VERSION"
24
+
25
+ # publish
26
+ git push origin refs/tags/v$VERSION
27
+ git push
28
+ fi
package/build/utils.js CHANGED
@@ -1,71 +1,71 @@
1
- var path = require('path')
2
- var config = require('../config')
3
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
4
-
5
- exports.assetsPath = function (_path) {
6
- var assetsSubDirectory = process.env.NODE_ENV === 'production'
7
- ? config.build.assetsSubDirectory
8
- : config.dev.assetsSubDirectory
9
- return path.posix.join(assetsSubDirectory, _path)
10
- }
11
-
12
- exports.cssLoaders = function (options) {
13
- options = options || {}
14
-
15
- var cssLoader = {
16
- loader: 'css-loader',
17
- options: {
18
- minimize: process.env.NODE_ENV === 'production',
19
- sourceMap: options.sourceMap
20
- }
21
- }
22
-
23
- // generate loader string to be used with extract text plugin
24
- function generateLoaders (loader, loaderOptions) {
25
- var loaders = [cssLoader]
26
- if (loader) {
27
- loaders.push({
28
- loader: loader + '-loader',
29
- options: Object.assign({}, loaderOptions, {
30
- sourceMap: options.sourceMap
31
- })
32
- })
33
- }
34
-
35
- // Extract CSS when that option is specified
36
- // (which is the case during production build)
37
- if (options.extract) {
38
- return ExtractTextPlugin.extract({
39
- use: loaders,
40
- fallback: 'vue-style-loader'
41
- })
42
- } else {
43
- return ['vue-style-loader'].concat(loaders)
44
- }
45
- }
46
-
47
- // https://vue-loader.vuejs.org/en/configurations/extract-css.html
48
- return {
49
- css: generateLoaders(),
50
- postcss: generateLoaders(),
51
- less: generateLoaders('less'),
52
- sass: generateLoaders('sass', { indentedSyntax: true }),
53
- scss: generateLoaders('sass'),
54
- stylus: generateLoaders('stylus'),
55
- styl: generateLoaders('stylus')
56
- }
57
- }
58
-
59
- // Generate loaders for standalone style files (outside of .vue)
60
- exports.styleLoaders = function (options) {
61
- var output = []
62
- var loaders = exports.cssLoaders(options)
63
- for (var extension in loaders) {
64
- var loader = loaders[extension]
65
- output.push({
66
- test: new RegExp('\\.' + extension + '$'),
67
- use: loader
68
- })
69
- }
70
- return output
71
- }
1
+ var path = require('path')
2
+ var config = require('../config')
3
+ var ExtractTextPlugin = require('extract-text-webpack-plugin')
4
+
5
+ exports.assetsPath = function (_path) {
6
+ var assetsSubDirectory = process.env.NODE_ENV === 'production'
7
+ ? config.build.assetsSubDirectory
8
+ : config.dev.assetsSubDirectory
9
+ return path.posix.join(assetsSubDirectory, _path)
10
+ }
11
+
12
+ exports.cssLoaders = function (options) {
13
+ options = options || {}
14
+
15
+ var cssLoader = {
16
+ loader: 'css-loader',
17
+ options: {
18
+ minimize: process.env.NODE_ENV === 'production',
19
+ sourceMap: options.sourceMap
20
+ }
21
+ }
22
+
23
+ // generate loader string to be used with extract text plugin
24
+ function generateLoaders (loader, loaderOptions) {
25
+ var loaders = [cssLoader]
26
+ if (loader) {
27
+ loaders.push({
28
+ loader: loader + '-loader',
29
+ options: Object.assign({}, loaderOptions, {
30
+ sourceMap: options.sourceMap
31
+ })
32
+ })
33
+ }
34
+
35
+ // Extract CSS when that option is specified
36
+ // (which is the case during production build)
37
+ if (options.extract) {
38
+ return ExtractTextPlugin.extract({
39
+ use: loaders,
40
+ fallback: 'vue-style-loader'
41
+ })
42
+ } else {
43
+ return ['vue-style-loader'].concat(loaders)
44
+ }
45
+ }
46
+
47
+ // https://vue-loader.vuejs.org/en/configurations/extract-css.html
48
+ return {
49
+ css: generateLoaders(),
50
+ postcss: generateLoaders(),
51
+ less: generateLoaders('less'),
52
+ sass: generateLoaders('sass', { indentedSyntax: true }),
53
+ scss: generateLoaders('sass'),
54
+ stylus: generateLoaders('stylus'),
55
+ styl: generateLoaders('stylus')
56
+ }
57
+ }
58
+
59
+ // Generate loaders for standalone style files (outside of .vue)
60
+ exports.styleLoaders = function (options) {
61
+ var output = []
62
+ var loaders = exports.cssLoaders(options)
63
+ for (var extension in loaders) {
64
+ var loader = loaders[extension]
65
+ output.push({
66
+ test: new RegExp('\\.' + extension + '$'),
67
+ use: loader
68
+ })
69
+ }
70
+ return output
71
+ }
@@ -1,31 +1,31 @@
1
- var webpack = require('webpack')
2
- var merge = require('webpack-merge')
3
- var baseConfig = require('./webpack.base.conf')
4
- var HtmlWebpackPlugin = require('html-webpack-plugin')
5
-
6
- // add hot-reload related code to entry chunks
7
- Object.keys(baseConfig.entry).forEach(function (name) {
8
- baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name])
9
- })
10
-
11
- module.exports = merge(baseConfig, {
12
- // eval-source-map is faster for development
13
- devtool: '#eval-source-map',
14
- output: {
15
- // necessary for the html plugin to work properly
16
- // when serving the html from in-memory
17
- publicPath: '/'
18
- },
19
- plugins: [
20
- // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
21
- new webpack.optimize.OccurenceOrderPlugin(),
22
- new webpack.HotModuleReplacementPlugin(),
23
- new webpack.NoErrorsPlugin(),
24
- // https://github.com/ampedandwired/html-webpack-plugin
25
- new HtmlWebpackPlugin({
26
- filename: 'index.html',
27
- template: 'index.html',
28
- inject: true
29
- })
30
- ]
31
- })
1
+ var webpack = require('webpack')
2
+ var merge = require('webpack-merge')
3
+ var baseConfig = require('./webpack.base.conf')
4
+ var HtmlWebpackPlugin = require('html-webpack-plugin')
5
+
6
+ // add hot-reload related code to entry chunks
7
+ Object.keys(baseConfig.entry).forEach(function (name) {
8
+ baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name])
9
+ })
10
+
11
+ module.exports = merge(baseConfig, {
12
+ // eval-source-map is faster for development
13
+ devtool: '#eval-source-map',
14
+ output: {
15
+ // necessary for the html plugin to work properly
16
+ // when serving the html from in-memory
17
+ publicPath: '/'
18
+ },
19
+ plugins: [
20
+ // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
21
+ new webpack.optimize.OccurenceOrderPlugin(),
22
+ new webpack.HotModuleReplacementPlugin(),
23
+ new webpack.NoErrorsPlugin(),
24
+ // https://github.com/ampedandwired/html-webpack-plugin
25
+ new HtmlWebpackPlugin({
26
+ filename: 'index.html',
27
+ template: 'index.html',
28
+ inject: true
29
+ })
30
+ ]
31
+ })
@@ -1,49 +1,49 @@
1
- var fs = require('fs')
2
- var webpack = require('webpack')
3
- var merge = require('webpack-merge')
4
- var baseConfig = require('./webpack.base.conf')
5
- var HtmlWebpackPlugin = require('html-webpack-plugin')
6
-
7
- // add hot-reload related code to entry chunks
8
- Object.keys(baseConfig.entry).forEach(function (name) {
9
- baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name])
10
- })
11
-
12
- // 把examples下所有index.html转换成测试例子.html
13
- fs.readdirSync('./examples').forEach((file) => {
14
- baseConfig.plugins.push(
15
- // https://github.com/ampedandwired/html-webpack-plugin
16
- new HtmlWebpackPlugin({
17
- filename: file + '.html',
18
- template: `examples/${file}/index.html`,
19
- inject: false
20
- })
21
- )
22
- })
23
-
24
- // 把examples下子目录里的main.js打包成对应组件名的App.js
25
- fs.readdirSync('./examples').forEach((file) => {
26
- baseConfig.entry[file + 'App'] = `./examples/${file}/main.js`
27
- })
28
-
29
- module.exports = merge(baseConfig, {
30
- // eval-source-map is faster for development
31
- devtool: '#eval-source-map',
32
- output: {
33
- // necessary for the html plugin to work properly
34
- // when serving the html from in-memory
35
- publicPath: '/'
36
- },
37
- plugins: [
38
- // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
39
- new webpack.optimize.OccurenceOrderPlugin(),
40
- new webpack.HotModuleReplacementPlugin(),
41
- new webpack.NoErrorsPlugin(),
42
- // https://github.com/ampedandwired/html-webpack-plugin
43
- new HtmlWebpackPlugin({
44
- filename: 'index.html',
45
- template: 'index.html',
46
- inject: true
47
- })
48
- ]
49
- })
1
+ var fs = require('fs')
2
+ var webpack = require('webpack')
3
+ var merge = require('webpack-merge')
4
+ var baseConfig = require('./webpack.base.conf')
5
+ var HtmlWebpackPlugin = require('html-webpack-plugin')
6
+
7
+ // add hot-reload related code to entry chunks
8
+ Object.keys(baseConfig.entry).forEach(function (name) {
9
+ baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name])
10
+ })
11
+
12
+ // 把examples下所有index.html转换成测试例子.html
13
+ fs.readdirSync('./examples').forEach((file) => {
14
+ baseConfig.plugins.push(
15
+ // https://github.com/ampedandwired/html-webpack-plugin
16
+ new HtmlWebpackPlugin({
17
+ filename: file + '.html',
18
+ template: `examples/${file}/index.html`,
19
+ inject: false
20
+ })
21
+ )
22
+ })
23
+
24
+ // 把examples下子目录里的main.js打包成对应组件名的App.js
25
+ fs.readdirSync('./examples').forEach((file) => {
26
+ baseConfig.entry[file + 'App'] = `./examples/${file}/main.js`
27
+ })
28
+
29
+ module.exports = merge(baseConfig, {
30
+ // eval-source-map is faster for development
31
+ devtool: '#eval-source-map',
32
+ output: {
33
+ // necessary for the html plugin to work properly
34
+ // when serving the html from in-memory
35
+ publicPath: '/'
36
+ },
37
+ plugins: [
38
+ // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
39
+ new webpack.optimize.OccurenceOrderPlugin(),
40
+ new webpack.HotModuleReplacementPlugin(),
41
+ new webpack.NoErrorsPlugin(),
42
+ // https://github.com/ampedandwired/html-webpack-plugin
43
+ new HtmlWebpackPlugin({
44
+ filename: 'index.html',
45
+ template: 'index.html',
46
+ inject: true
47
+ })
48
+ ]
49
+ })
@@ -1,31 +1,31 @@
1
- // This is the webpack config used for unit tests.
2
-
3
- var utils = require('./utils')
4
- var webpack = require('webpack')
5
- var merge = require('webpack-merge')
6
- var baseConfig = require('./webpack.base.conf')
7
-
8
- var webpackConfig = merge(baseConfig, {
9
- module: {
10
- rules: utils.styleLoaders()
11
- },
12
- // use inline sourcemap for karma-sourcemap-loader
13
- devtool: '#inline-source-map',
14
- resolveLoader: {
15
- alias: {
16
- // necessary to to make lang="scss" work in test when using vue-loader's ?inject option
17
- // see discussion at https://github.com/vuejs/vue-loader/issues/724
18
- 'scss-loader': 'sass-loader'
19
- }
20
- },
21
- plugins: [
22
- new webpack.DefinePlugin({
23
- 'process.env': require('../config/test.env')
24
- })
25
- ]
26
- })
27
-
28
- // no need for app entry during tests
29
- delete webpackConfig.entry
30
-
31
- module.exports = webpackConfig
1
+ // This is the webpack config used for unit tests.
2
+
3
+ var utils = require('./utils')
4
+ var webpack = require('webpack')
5
+ var merge = require('webpack-merge')
6
+ var baseConfig = require('./webpack.base.conf')
7
+
8
+ var webpackConfig = merge(baseConfig, {
9
+ module: {
10
+ rules: utils.styleLoaders()
11
+ },
12
+ // use inline sourcemap for karma-sourcemap-loader
13
+ devtool: '#inline-source-map',
14
+ resolveLoader: {
15
+ alias: {
16
+ // necessary to to make lang="scss" work in test when using vue-loader's ?inject option
17
+ // see discussion at https://github.com/vuejs/vue-loader/issues/724
18
+ 'scss-loader': 'sass-loader'
19
+ }
20
+ },
21
+ plugins: [
22
+ new webpack.DefinePlugin({
23
+ 'process.env': require('../config/test.env')
24
+ })
25
+ ]
26
+ })
27
+
28
+ // no need for app entry during tests
29
+ delete webpackConfig.entry
30
+
31
+ module.exports = webpackConfig