sale-client 3.4.80 → 3.4.81
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.
- package/.babelrc +5 -5
- package/.editorconfig +9 -9
- package/.gradle/{3.5/file-changes → 5.2.1/fileChanges}/last-build.bin +0 -0
- package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/{buildOutputCleanup/built.bin → 5.2.1/gc.properties} +0 -0
- package/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/6.1.1/fileChanges/last-build.bin +0 -0
- package/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/6.1.1/gc.properties +0 -0
- package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
- package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
- package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
- package/.gradle/7.1/fileChanges/last-build.bin +0 -0
- package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
- package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
- package/.gradle/7.1/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/.gradle/checksums/checksums.lock +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/.project +11 -11
- package/README.md +38 -38
- package/build/css-loaders.js +34 -34
- package/build/dev-client.js +8 -8
- package/build/dev-server.js +6 -3
- package/build/release.sh +28 -28
- package/build/utils.js +71 -71
- package/build/webpack.dev.conf.js +31 -31
- package/build/webpack.example.conf.js +49 -49
- package/build/webpack.test.conf.js +31 -31
- package/config/dev.env.js +6 -6
- package/config/index.js +38 -38
- package/config/prod.env.js +3 -3
- package/config/test.env.js +6 -6
- package/examples/ReadCard/index.html +11 -11
- package/package.json +1 -1
- package/release.bat +5 -5
- package/sale-client.iml +8 -8
- package/src/assets/binding.svg +1 -1
- package/src/assets/unbind.svg +1 -1
- package/src/assets//345/205/254/345/221/212.svg +1 -1
- package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
- package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
- package/src/components/FilesManage/UserGeneralInfoTest.vue +1 -1
- package/src/components/Hello.vue +39 -39
- package/src/components/List.vue +51 -51
- package/src/components/SellGasCharge/FakaList.vue +23 -23
- package/src/components/UserFiles/admissibility.vue +46 -46
- package/src/components/charge/business/IOTMeterCenter.vue +1 -0
- package/src/components/common/userinfo_detail/UserBaseInfoNew.vue +346 -346
- package/src/components/getNowDate.js +25 -25
- package/src/components/revenue/Common/PrintBill.vue +1 -0
- package/src/components/revenue/bank/BankDocking.vue +62 -62
- package/src/components/revenue/base/CardServer/CardInfoModal.vue +52 -52
- package/src/components/revenue/base/rightview/carddetail/StopApplyDetail.vue +70 -70
- package/src/components/revenue/comprehen/CardManage/CardManage.vue +83 -83
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/NoMessage.vue +30 -30
- package/src/components/revenue/comprehen/ComprehenOperation/ComprehenSearch.vue +13 -13
- package/src/components/revenue/comprehen/Message/MessageList.vue +499 -499
- package/src/components/revenue/comprehen/TotalSplit/TotalSplitManage.vue +45 -45
- package/src/filiale/tongchuan/MeterinfoTest.vue +892 -892
- package/src/main.js +23 -23
- package/src/plugins/CardListen.js +29 -29
- package/src/plugins/CardManageService.js +21 -21
- package/src/plugins/SelectService.js +41 -41
- package/src/project/ProjectPage.vue +24 -24
- package/src/project/State.js +17 -17
- package/test/e2e/custom-assertions/elementCount.js +26 -26
- package/test/e2e/nightwatch.conf.js +40 -40
- package/test/e2e/runner.js +30 -30
- package/test/e2e/specs/test.js +13 -13
- package/test/unit/.eslintrc +5 -5
- package/test/unit/context.html +20 -20
- package/test/unit/index.js +13 -13
- package/test/unit/init.js +13 -13
- package/test/unit/karma.conf.js +55 -55
- package/test/unit/specs/components/UserFiles/AreaList.spec.js +25 -25
- package/test/unit/specs/components/UserFiles/UserFiles.spec.js +22 -22
- package/test/unit/specs/components/UserFiles/UserGeneralInfo.spec.js +55 -55
- package/test/unit/specs/components/revenue/Common/ReissueBill.spec.js +29 -29
- package/test/unit/specs/components/revenue/base/CardServer/ReadCard.spec.js +23 -23
- package/test/unit/specs/components/revenue/base/UserList.spec.js +21 -21
- package/test/unit/specs/components/revenue/base/rightview/CardList.spec.js +29 -29
- package/test/unit/specs/components/revenue/todoList/ToDoListManage.spec.js +20 -20
- package/test/unit/specs/service/delete.spec.js +8 -8
- package/test/unit/specs/service/getSaleInitData.spec.js +16 -16
- package/test/unit/specs/service/uploadFile.spec.js +8 -8
- package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
- 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
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#
|
|
2
|
-
gradle.version=
|
|
1
|
+
#Fri Jan 21 16:32:44 CST 2022
|
|
2
|
+
gradle.version=5.2.1
|
|
Binary file
|
|
File without changes
|
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/)
|
package/build/css-loaders.js
CHANGED
|
@@ -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
|
+
}
|
package/build/dev-client.js
CHANGED
|
@@ -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/dev-server.js
CHANGED
|
@@ -10,9 +10,9 @@ var compiler = webpack(config)
|
|
|
10
10
|
|
|
11
11
|
// Define HTTP proxies to your custom API backend
|
|
12
12
|
// https://github.com/chimurai/http-proxy-middleware
|
|
13
|
-
var bendi = 'http://127.0.0.1:
|
|
13
|
+
var bendi = 'http://127.0.0.1:6666/sale',bendi1 = ''
|
|
14
14
|
// 公司测试服务
|
|
15
|
-
var fuwu = 'http://
|
|
15
|
+
var fuwu = 'http://aotesoft.f3322.net:8400/'
|
|
16
16
|
//铜川正式
|
|
17
17
|
// var fuwu = 'http://61.134.55.234:9999/'
|
|
18
18
|
//铜川测试
|
|
@@ -87,6 +87,9 @@ var proxyTable = {
|
|
|
87
87
|
'/rs/sql/manage_getstreetlist': {
|
|
88
88
|
target: fuwu
|
|
89
89
|
},
|
|
90
|
+
'/rs/sql/arrearsQuery':{
|
|
91
|
+
target: 'http://127.0.0.1:8079'
|
|
92
|
+
},
|
|
90
93
|
'/rs/report': {
|
|
91
94
|
target: 'http://127.0.0.1:8079'
|
|
92
95
|
},
|
|
@@ -95,7 +98,7 @@ var proxyTable = {
|
|
|
95
98
|
},
|
|
96
99
|
'/rs': {
|
|
97
100
|
// target: 'http://192.168.30.63:8081/'
|
|
98
|
-
target:
|
|
101
|
+
target: bendi
|
|
99
102
|
// target:fuwu
|
|
100
103
|
}
|
|
101
104
|
}
|
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
|
+
})
|