sale-client 3.4.93 → 3.4.97

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 (120) 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.base.conf.js +1 -0
  13. package/build/webpack.dev.conf.js +31 -31
  14. package/build/webpack.example.conf.js +49 -49
  15. package/build/webpack.singlepage.conf.js +67 -0
  16. package/build/webpack.test.conf.js +31 -31
  17. package/config/dev.env.js +6 -6
  18. package/config/index.js +38 -38
  19. package/config/prod.env.js +3 -3
  20. package/config/test.env.js +6 -6
  21. package/examples/ReadCard/index.html +11 -11
  22. package/{.gradle/buildOutputCleanup/built.bin → npm} +0 -0
  23. package/package.json +116 -114
  24. package/release.bat +5 -5
  25. package/sale-client.iml +8 -8
  26. package/singlepage/page/App.vue +9 -0
  27. package/singlepage/page/index.html +16 -0
  28. package/singlepage/page/main.js +23 -0
  29. package/src/assets/binding.svg +1 -1
  30. package/src/assets/unbind.svg +1 -1
  31. package/src/assets//345/205/254/345/221/212.svg +1 -1
  32. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  33. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  34. package/src/components/FilesManage/TemplateManage.vue +167 -167
  35. package/src/components/FilesManage/UserDeviceInfoTest.vue +51 -5
  36. package/src/components/Hello.vue +39 -39
  37. package/src/components/List.vue +51 -51
  38. package/src/components/SellGasCharge/FakaList.vue +23 -23
  39. package/src/components/UserFiles/admissibility.vue +46 -46
  40. package/src/components/charge/ChargeOper.vue +230 -230
  41. package/src/components/charge/business/FilesComplete.vue +253 -253
  42. package/src/components/charge/business/OtherChargeByPay.vue +471 -471
  43. package/src/components/charge/business/refund/IOTRefund.vue +236 -236
  44. package/src/components/charge/business/refund/RefundManage.vue +28 -28
  45. package/src/components/charge/gasloss/gasLossOperate.vue +14 -11
  46. package/src/components/common/userinfo_detail/UserBaseInfoNew.vue +8 -7
  47. package/src/components/getNowDate.js +25 -25
  48. package/src/components/revenue/Common/MeterMessage.vue +184 -184
  49. package/src/components/revenue/bank/BankDocking.vue +62 -62
  50. package/src/components/revenue/base/CardServer/CardInfoModal.vue +52 -52
  51. package/src/components/revenue/base/leftview/MixPriceInfo.vue +60 -60
  52. package/src/components/revenue/base/leftview/SafeCheck.vue +311 -311
  53. package/src/components/revenue/base/leftview/Stairinfo.vue +156 -156
  54. package/src/components/revenue/base/rightview/CardList.vue +2 -2
  55. package/src/components/revenue/base/rightview/carddetail/StopApplyDetail.vue +70 -70
  56. package/src/components/revenue/comprehen/CardManage/CardManage.vue +83 -83
  57. package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/NoMessage.vue +30 -30
  58. package/src/components/revenue/comprehen/ComprehenOperation/ComprehenSearch.vue +13 -13
  59. package/src/components/revenue/comprehen/ComprehenOperation/wallheating/WallheatingInfoAdd.vue +170 -0
  60. package/src/components/revenue/comprehen/Maintenance/revenue/MeterOperatemain.vue +6 -1
  61. package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackModal.vue +211 -0
  62. package/src/components/revenue/comprehen/TotalSplit/TotalSplitManage.vue +45 -45
  63. package/src/components/revenue/comprehen/gasbrand/AddGasBrand.vue +392 -392
  64. package/src/components/revenue/comprehen/replacement/replacementHandInfoRecord.vue +155 -155
  65. package/src/components/revenue/comprehen/wechatpay/WeChat.vue +62 -62
  66. package/src/components/revenue/comprehen/wechatpay/wechatValidateManage.vue +295 -295
  67. package/src/filiale/WEINAN/ChargeList.vue +12 -2
  68. package/src/filiale/alashan/PrintBill.vue +116 -116
  69. package/src/filiale/macheng/FilesManageNew/FileUserFiles.vue +743 -0
  70. package/src/filiale/macheng/UserBaseInfoNew.vue +10 -7
  71. package/src/filiale/meihekou/PrintBill.vue +140 -140
  72. package/src/filiale/meihekou/ReissueBill.vue +322 -322
  73. package/src/filiale/qianneng/FilesManage/MeterinfoTest.vue +2 -6
  74. package/src/filiale/qianneng/HandManager.vue +1838 -1824
  75. package/src/filiale/qianneng/HighMeter.vue +921 -0
  76. package/src/filiale/qianneng/HighMeterIdCard.vue +1034 -0
  77. package/src/filiale/qianneng/js/OcxUtil.js +1663 -0
  78. package/src/filiale/qianneng/js/WsUtil.js +2507 -0
  79. package/src/filiale/qianneng/js/axCam_Ocx.js +81 -0
  80. package/src/filiale/qianneng/js/axCam_Ocx2.js +35 -0
  81. package/src/filiale/qianneng/js/hignmeter.js +454 -0
  82. package/src/filiale/qianneng/sale.js +2 -0
  83. package/src/filiale/rongcheng/FilesManageNew/UserGeneralInfoTest.vue +608 -608
  84. package/src/filiale/rongchuang/CardMeterCenter.vue +857 -857
  85. package/src/filiale/rongchuang/OtherGas.vue +329 -329
  86. package/src/filiale/shanggao/FileAddressList.vue +139 -0
  87. package/src/filiale/shanggao/sale.js +7 -0
  88. package/src/filiale/zhongsheng/rightview/CardList.vue +492 -492
  89. package/src/filiale/zhongsheng/wechatpay/WeChatPayDetail.vue +469 -469
  90. package/src/main.js +1 -1
  91. package/src/plugins/CardListen.js +29 -29
  92. package/src/plugins/CardManageService.js +21 -21
  93. package/src/plugins/FileManageService.js +2 -0
  94. package/src/plugins/SelectService.js +41 -41
  95. package/src/project/ProjectPage.vue +24 -24
  96. package/src/project/State.js +17 -17
  97. package/src/sale.js +3 -0
  98. package/test/e2e/custom-assertions/elementCount.js +26 -26
  99. package/test/e2e/nightwatch.conf.js +40 -40
  100. package/test/e2e/runner.js +30 -30
  101. package/test/e2e/specs/test.js +13 -13
  102. package/test/unit/.eslintrc +5 -5
  103. package/test/unit/context.html +20 -20
  104. package/test/unit/index.js +13 -13
  105. package/test/unit/init.js +13 -13
  106. package/test/unit/karma.conf.js +55 -55
  107. package/test/unit/specs/components/UserFiles/AreaList.spec.js +25 -25
  108. package/test/unit/specs/components/UserFiles/UserFiles.spec.js +22 -22
  109. package/test/unit/specs/components/UserFiles/UserGeneralInfo.spec.js +55 -55
  110. package/test/unit/specs/components/revenue/Common/ReissueBill.spec.js +29 -29
  111. package/test/unit/specs/components/revenue/base/CardServer/ReadCard.spec.js +23 -23
  112. package/test/unit/specs/components/revenue/base/UserList.spec.js +21 -21
  113. package/test/unit/specs/components/revenue/base/rightview/CardList.spec.js +29 -29
  114. package/test/unit/specs/components/revenue/todoList/ToDoListManage.spec.js +20 -20
  115. package/test/unit/specs/service/delete.spec.js +8 -8
  116. package/test/unit/specs/service/getSaleInitData.spec.js +16 -16
  117. package/test/unit/specs/service/uploadFile.spec.js +8 -8
  118. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  119. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  120. 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
+ }
@@ -35,6 +35,7 @@ module.exports = {
35
35
  /src/,
36
36
  /build/,
37
37
  /examples/,
38
+ /singlepage/,
38
39
  /test/,
39
40
  /node_modules\/vue-client\/src/,
40
41
  /node_modules\/vue-strap\/src/,
@@ -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
+ })
@@ -0,0 +1,67 @@
1
+ var fs = require('fs')
2
+ var path = require('path')
3
+ var webpack = require('webpack')
4
+ var merge = require('webpack-merge')
5
+ var baseConfig = require('./webpack.base.conf')
6
+ var HtmlWebpackPlugin = require('html-webpack-plugin')
7
+ var CompressionWebpackPlugin = require('compression-webpack-plugin')
8
+
9
+ // add hot-reload related code to entry chunks
10
+ Object.keys(baseConfig.entry).forEach(function (name) {
11
+ baseConfig.entry[name] = ['./build/dev-client'].concat(baseConfig.entry[name])
12
+ })
13
+
14
+ // 把singlepage下所有index.html转换成测试例子.html
15
+ fs.readdirSync('./singlepage').forEach((file) => {
16
+ baseConfig.plugins.push(
17
+ // https://github.com/ampedandwired/html-webpack-plugin
18
+ new HtmlWebpackPlugin({
19
+ filename: file + '.html',
20
+ template: `singlepage/${file}/index.html`,
21
+ inject: false
22
+ })
23
+ )
24
+ })
25
+
26
+ // 把singlepage下子目录里的main.js打包成对应组件名的js
27
+ fs.readdirSync('./singlepage').forEach((file) => {
28
+ baseConfig.entry[file] = `./singlepage/${file}/main.js`
29
+ })
30
+
31
+ module.exports = merge(baseConfig, {
32
+ // eval-source-map is faster for development
33
+ devtool: '#eval-source-map',
34
+ output: {
35
+ // necessary for the html plugin to work properly
36
+ // when serving the html from in-memory
37
+ publicPath: './',
38
+ path: path.resolve(__dirname, '../dist/singlepage'),
39
+ chunkFilename: '[name].[hash].js'
40
+ },
41
+ productionGzip: true,
42
+ productionGzipExtensions: ['js', 'css', 'vue'],
43
+ plugins: [
44
+ new CompressionWebpackPlugin({
45
+ filename: '[path].gz[query]',
46
+ algorithm: 'gzip',
47
+ test: new RegExp(
48
+ '\\.(' +
49
+ ['js', 'css', 'vue'].join('|') +
50
+ ')$'
51
+ ),
52
+ threshold: 10240,
53
+ minRatio: 0.8
54
+ }),
55
+
56
+ // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
57
+ new webpack.optimize.OccurenceOrderPlugin(),
58
+ new webpack.HotModuleReplacementPlugin(),
59
+ new webpack.NoErrorsPlugin(),
60
+ // https://github.com/ampedandwired/html-webpack-plugin
61
+ new HtmlWebpackPlugin({
62
+ filename: 'index.html',
63
+ template: 'index.html',
64
+ inject: true
65
+ })
66
+ ]
67
+ })