sale-client 3.4.95 → 3.4.96

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 (102) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.gradle/{3.5/file-changes → 4.4/fileChanges}/last-build.bin +0 -0
  4. package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
  5. package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
  6. package/.project +11 -11
  7. package/README.md +38 -38
  8. package/build/css-loaders.js +34 -34
  9. package/build/dev-client.js +8 -8
  10. package/build/release.sh +28 -28
  11. package/build/utils.js +71 -71
  12. package/build/webpack.dev.conf.js +31 -31
  13. package/build/webpack.example.conf.js +49 -49
  14. package/build/webpack.test.conf.js +31 -31
  15. package/config/dev.env.js +6 -6
  16. package/config/index.js +38 -38
  17. package/config/prod.env.js +3 -3
  18. package/config/test.env.js +6 -6
  19. package/examples/ReadCard/index.html +11 -11
  20. package/package.json +3 -3
  21. package/release.bat +5 -5
  22. package/sale-client.iml +8 -8
  23. package/src/assets/binding.svg +1 -1
  24. package/src/assets/unbind.svg +1 -1
  25. package/src/assets//345/205/254/345/221/212.svg +1 -1
  26. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  27. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  28. package/src/components/FilesManage/TemplateManage.vue +167 -167
  29. package/src/components/FilesManage/UserDeviceInfoTest.vue +51 -5
  30. package/src/components/Hello.vue +39 -39
  31. package/src/components/List.vue +51 -51
  32. package/src/components/SellGasCharge/FakaList.vue +23 -23
  33. package/src/components/UserFiles/admissibility.vue +46 -46
  34. package/src/components/charge/ChargeOper.vue +230 -230
  35. package/src/components/charge/business/FilesComplete.vue +253 -253
  36. package/src/components/charge/business/OtherChargeByPay.vue +471 -471
  37. package/src/components/charge/business/refund/IOTRefund.vue +236 -236
  38. package/src/components/charge/business/refund/RefundManage.vue +28 -28
  39. package/src/components/common/userinfo_detail/UserBaseInfoNew.vue +6 -7
  40. package/src/components/getNowDate.js +25 -25
  41. package/src/components/revenue/Common/MeterMessage.vue +184 -184
  42. package/src/components/revenue/bank/BankDocking.vue +62 -62
  43. package/src/components/revenue/base/CardServer/CardInfoModal.vue +52 -52
  44. package/src/components/revenue/base/leftview/MixPriceInfo.vue +60 -60
  45. package/src/components/revenue/base/leftview/SafeCheck.vue +311 -311
  46. package/src/components/revenue/base/leftview/Stairinfo.vue +156 -156
  47. package/src/components/revenue/base/rightview/CardList.vue +2 -2
  48. package/src/components/revenue/base/rightview/carddetail/StopApplyDetail.vue +70 -70
  49. package/src/components/revenue/comprehen/CardManage/CardManage.vue +83 -83
  50. package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/NoMessage.vue +30 -30
  51. package/src/components/revenue/comprehen/ComprehenOperation/ComprehenSearch.vue +13 -13
  52. package/src/components/revenue/comprehen/ComprehenOperation/wallheating/WallheatingInfoAdd.vue +170 -0
  53. package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackModal.vue +211 -0
  54. package/src/components/revenue/comprehen/TotalSplit/TotalSplitManage.vue +45 -45
  55. package/src/components/revenue/comprehen/gasbrand/AddGasBrand.vue +392 -392
  56. package/src/components/revenue/comprehen/replacement/replacementHandInfoRecord.vue +155 -155
  57. package/src/components/revenue/comprehen/wechatpay/WeChat.vue +62 -62
  58. package/src/components/revenue/comprehen/wechatpay/wechatValidateManage.vue +295 -295
  59. package/src/filiale/WEINAN/ChargeList.vue +12 -2
  60. package/src/filiale/alashan/PrintBill.vue +116 -116
  61. package/src/filiale/macheng/FilesManageNew/FileUserFiles.vue +743 -0
  62. package/src/filiale/macheng/UserBaseInfoNew.vue +6 -6
  63. package/src/filiale/meihekou/PrintBill.vue +140 -140
  64. package/src/filiale/meihekou/ReissueBill.vue +322 -322
  65. package/src/filiale/qianneng/HandManager.vue +1838 -1824
  66. package/src/filiale/rongcheng/FilesManageNew/UserGeneralInfoTest.vue +608 -608
  67. package/src/filiale/rongchuang/CardMeterCenter.vue +857 -857
  68. package/src/filiale/rongchuang/OtherGas.vue +329 -329
  69. package/src/filiale/zhongsheng/rightview/CardList.vue +492 -492
  70. package/src/filiale/zhongsheng/wechatpay/WeChatPayDetail.vue +469 -469
  71. package/src/main.js +1 -1
  72. package/src/plugins/CardListen.js +29 -29
  73. package/src/plugins/CardManageService.js +21 -21
  74. package/src/plugins/FileManageService.js +2 -0
  75. package/src/plugins/SelectService.js +41 -41
  76. package/src/project/ProjectPage.vue +24 -24
  77. package/src/project/State.js +17 -17
  78. package/src/sale.js +3 -0
  79. package/test/e2e/custom-assertions/elementCount.js +26 -26
  80. package/test/e2e/nightwatch.conf.js +40 -40
  81. package/test/e2e/runner.js +30 -30
  82. package/test/e2e/specs/test.js +13 -13
  83. package/test/unit/.eslintrc +5 -5
  84. package/test/unit/context.html +20 -20
  85. package/test/unit/index.js +13 -13
  86. package/test/unit/init.js +13 -13
  87. package/test/unit/karma.conf.js +55 -55
  88. package/test/unit/specs/components/UserFiles/AreaList.spec.js +25 -25
  89. package/test/unit/specs/components/UserFiles/UserFiles.spec.js +22 -22
  90. package/test/unit/specs/components/UserFiles/UserGeneralInfo.spec.js +55 -55
  91. package/test/unit/specs/components/revenue/Common/ReissueBill.spec.js +29 -29
  92. package/test/unit/specs/components/revenue/base/CardServer/ReadCard.spec.js +23 -23
  93. package/test/unit/specs/components/revenue/base/UserList.spec.js +21 -21
  94. package/test/unit/specs/components/revenue/base/rightview/CardList.spec.js +29 -29
  95. package/test/unit/specs/components/revenue/todoList/ToDoListManage.spec.js +20 -20
  96. package/test/unit/specs/service/delete.spec.js +8 -8
  97. package/test/unit/specs/service/getSaleInitData.spec.js +16 -16
  98. package/test/unit/specs/service/uploadFile.spec.js +8 -8
  99. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  100. package/.gradle/buildOutputCleanup/built.bin +0 -0
  101. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  102. 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
+ })
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