manage-client 3.2.128 → 3.2.131

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.
File without changes
@@ -1,143 +1,143 @@
1
- const webpack = require('webpack')
2
- const merge = require('webpack-merge')
3
- const baseConfig = require('./webpack.base.conf')
4
- const cssLoaders = require('./css-loaders')
5
- const ExtractTextPlugin = require('extract-text-webpack-plugin')
6
- // const HtmlWebpackPlugin = require('html-webpack-plugin')
7
- const FileManagerPlugin = require('filemanager-webpack-plugin')
8
- const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')
9
- const path = require('path')
10
-
11
- // 将日期时间进行格式化
12
- function formatDate (date, format) {
13
- // name="date" type="Date" 要格式化的日期时间
14
- // name="format" type="String" 格式类型,形如 yyyy-MM-dd hh:mm:ss
15
- var o = {
16
- 'M+': date.getMonth() + 1,
17
- // 月份
18
- 'd+': date.getDate(),
19
- // 日
20
- 'h+': date.getHours(),
21
- // 小时
22
- 'm+': date.getMinutes(),
23
- // 分
24
- 's+': date.getSeconds() // 秒
25
- }
26
- if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
27
- for (var k in o) if (new RegExp('(' + k + ')').test(format)) format = format.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
28
- return format
29
- }
30
- const timeStamp = formatDate(new Date(), 'yyyy-MM-dd-hh-mm-ss')
31
- console.log('开始打包:', timeStamp)
32
- console.log('入口:', process.env.VUE_APP_ENTRY)
33
- // 单个入口打包压缩配置
34
- let onEndParam = {
35
- copy: [
36
- {source: './package.json', destination: './lib/package_' + timeStamp + '.json'}
37
- ],
38
- archive: [
39
- { source: './lib', destination: './' + process.env.VUE_APP_ENTRY + '_lib' + timeStamp + '.zip' }
40
- ]
41
- }
42
- if (process.env.VUE_APP_SINGLE !== 'true') {
43
- onEndParam = {}
44
- // 多个一起打包, 最后一个在压缩
45
- if (process.env.VUE_APP_BUILDEND === 'true') {
46
- onEndParam = {
47
- copy: [
48
- {source: './package.json', destination: './lib/package_' + timeStamp + '.json'}
49
- ],
50
- archive: [
51
- { source: './lib', destination: './manage_lib' + timeStamp + '.zip' }
52
- ]
53
- }
54
- }
55
- }
56
-
57
- // whether to generate source map for production files.
58
- // disabling this can speed up the build.
59
- const SOURCE_MAP = false
60
-
61
- module.exports = merge(baseConfig, {
62
- externals: {
63
- 'vue-client': 'vue-client',
64
- 'system-clients': 'system-clients',
65
- 'vue': 'vue'
66
- },
67
- stats: {
68
- children: false
69
- },
70
- devtool: SOURCE_MAP ? '#source-map' : false,
71
- entry: {
72
- app: './src/' + process.env.VUE_APP_ENTRY + '.js'
73
- },
74
- output: {
75
- // naming output files with hashes for better caching.
76
- // dist/index.html will be auto-generated with correct URLs.
77
- publicPath: 'library/manage/' + process.env.VUE_APP_ENTRY + '/lib/',
78
- path: path.resolve(__dirname, '../lib/' + process.env.VUE_APP_ENTRY + '/lib'),
79
- filename: 'lib.js',
80
- libraryTarget: 'umd' // 不管在commonJS环境还是在AMD环境,能让任何形式引入都可以引入
81
- },
82
- vue: {
83
- loaders: cssLoaders({
84
- sourceMap: SOURCE_MAP,
85
- extract: true
86
- })
87
- },
88
- plugins: [
89
- // http://vuejs.github.io/vue-loader/workflow/production.html
90
- new webpack.DefinePlugin({
91
- 'process.env': {
92
- NODE_ENV: '"production"'
93
- }
94
- }),
95
- new ParallelUglifyPlugin({
96
- // 用作缓存的可选绝对路径。如果未提供,则不使用缓存。
97
- // cacheDir: '.cache/',
98
- uglifyJS: {
99
- output: {
100
- // 是否保留代码中的注释,默认为保留
101
- comments: false
102
- },
103
- // 是否在UglifyJS删除没有用到的代码时输出警告信息,默认为false
104
- warnings: false,
105
- compress: {
106
- // 是否删除代码中所有的console语句,默认为false
107
- drop_console: true,
108
- // 是否内嵌虽然已经定义了,但是只用到一次的变量, 默认值false
109
- collapse_vars: true,
110
- // 是否提取出现了多次但是没有定义成变量去引用的静态值,默认为false
111
- reduce_vars: true
112
- }
113
- }
114
- }),
115
- // new webpack.optimize.UglifyJsPlugin({
116
- // compress: {
117
- // warnings: false
118
- // }
119
- // }),
120
- new webpack.optimize.OccurenceOrderPlugin(),
121
- // extract css into its own file
122
- new ExtractTextPlugin('[name].css'),
123
- // generate dist index.html with correct asset hash for caching.
124
- // you can customize output by editing /index.html
125
- // see https://github.com/ampedandwired/html-webpack-plugin
126
- // new HtmlWebpackPlugin({
127
- // filename: '../index.html',
128
- // template: 'index.html',
129
- // inject: true,
130
- // minify: {
131
- // removeComments: true,
132
- // collapseWhitespace: true,
133
- // removeAttributeQuotes: true
134
- // // more options:
135
- // // https://github.com/kangax/html-minifier#options-quick-reference
136
- // }
137
- // }),
138
- // 打包文件压缩
139
- new FileManagerPlugin({
140
- onEnd: onEndParam
141
- })
142
- ]
143
- })
1
+ const webpack = require('webpack')
2
+ const merge = require('webpack-merge')
3
+ const baseConfig = require('./webpack.base.conf')
4
+ const cssLoaders = require('./css-loaders')
5
+ const ExtractTextPlugin = require('extract-text-webpack-plugin')
6
+ // const HtmlWebpackPlugin = require('html-webpack-plugin')
7
+ const FileManagerPlugin = require('filemanager-webpack-plugin')
8
+ const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')
9
+ const path = require('path')
10
+
11
+ // 将日期时间进行格式化
12
+ function formatDate (date, format) {
13
+ // name="date" type="Date" 要格式化的日期时间
14
+ // name="format" type="String" 格式类型,形如 yyyy-MM-dd hh:mm:ss
15
+ var o = {
16
+ 'M+': date.getMonth() + 1,
17
+ // 月份
18
+ 'd+': date.getDate(),
19
+ // 日
20
+ 'h+': date.getHours(),
21
+ // 小时
22
+ 'm+': date.getMinutes(),
23
+ // 分
24
+ 's+': date.getSeconds() // 秒
25
+ }
26
+ if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
27
+ for (var k in o) if (new RegExp('(' + k + ')').test(format)) format = format.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
28
+ return format
29
+ }
30
+ const timeStamp = formatDate(new Date(), 'yyyy-MM-dd-hh-mm-ss')
31
+ console.log('开始打包:', timeStamp)
32
+ console.log('入口:', process.env.VUE_APP_ENTRY)
33
+ // 单个入口打包压缩配置
34
+ let onEndParam = {
35
+ copy: [
36
+ {source: './package.json', destination: './lib/package_' + timeStamp + '.json'}
37
+ ],
38
+ archive: [
39
+ { source: './lib', destination: './' + process.env.VUE_APP_ENTRY + '_lib' + timeStamp + '.zip' }
40
+ ]
41
+ }
42
+ if (process.env.VUE_APP_SINGLE !== 'true') {
43
+ onEndParam = {}
44
+ // 多个一起打包, 最后一个在压缩
45
+ if (process.env.VUE_APP_BUILDEND === 'true') {
46
+ onEndParam = {
47
+ copy: [
48
+ {source: './package.json', destination: './lib/package_' + timeStamp + '.json'}
49
+ ],
50
+ archive: [
51
+ { source: './lib', destination: './manage_lib' + timeStamp + '.zip' }
52
+ ]
53
+ }
54
+ }
55
+ }
56
+
57
+ // whether to generate source map for production files.
58
+ // disabling this can speed up the build.
59
+ const SOURCE_MAP = false
60
+
61
+ module.exports = merge(baseConfig, {
62
+ externals: {
63
+ 'vue-client': 'vue-client',
64
+ 'system-clients': 'system-clients',
65
+ 'vue': 'vue'
66
+ },
67
+ stats: {
68
+ children: false
69
+ },
70
+ devtool: SOURCE_MAP ? '#source-map' : false,
71
+ entry: {
72
+ app: './src/' + process.env.VUE_APP_ENTRY + '.js'
73
+ },
74
+ output: {
75
+ // naming output files with hashes for better caching.
76
+ // dist/index.html will be auto-generated with correct URLs.
77
+ publicPath: 'library/manage/' + process.env.VUE_APP_ENTRY + '/lib/',
78
+ path: path.resolve(__dirname, '../lib/' + process.env.VUE_APP_ENTRY + '/lib'),
79
+ filename: 'lib.js',
80
+ libraryTarget: 'umd' // 不管在commonJS环境还是在AMD环境,能让任何形式引入都可以引入
81
+ },
82
+ vue: {
83
+ loaders: cssLoaders({
84
+ sourceMap: SOURCE_MAP,
85
+ extract: true
86
+ })
87
+ },
88
+ plugins: [
89
+ // http://vuejs.github.io/vue-loader/workflow/production.html
90
+ new webpack.DefinePlugin({
91
+ 'process.env': {
92
+ NODE_ENV: '"production"'
93
+ }
94
+ }),
95
+ new ParallelUglifyPlugin({
96
+ // 用作缓存的可选绝对路径。如果未提供,则不使用缓存。
97
+ // cacheDir: '.cache/',
98
+ uglifyJS: {
99
+ output: {
100
+ // 是否保留代码中的注释,默认为保留
101
+ comments: false
102
+ },
103
+ // 是否在UglifyJS删除没有用到的代码时输出警告信息,默认为false
104
+ warnings: false,
105
+ compress: {
106
+ // 是否删除代码中所有的console语句,默认为false
107
+ drop_console: true,
108
+ // 是否内嵌虽然已经定义了,但是只用到一次的变量, 默认值false
109
+ collapse_vars: true,
110
+ // 是否提取出现了多次但是没有定义成变量去引用的静态值,默认为false
111
+ reduce_vars: true
112
+ }
113
+ }
114
+ }),
115
+ // new webpack.optimize.UglifyJsPlugin({
116
+ // compress: {
117
+ // warnings: false
118
+ // }
119
+ // }),
120
+ new webpack.optimize.OccurenceOrderPlugin(),
121
+ // extract css into its own file
122
+ new ExtractTextPlugin('[name].css'),
123
+ // generate dist index.html with correct asset hash for caching.
124
+ // you can customize output by editing /index.html
125
+ // see https://github.com/ampedandwired/html-webpack-plugin
126
+ // new HtmlWebpackPlugin({
127
+ // filename: '../index.html',
128
+ // template: 'index.html',
129
+ // inject: true,
130
+ // minify: {
131
+ // removeComments: true,
132
+ // collapseWhitespace: true,
133
+ // removeAttributeQuotes: true
134
+ // // more options:
135
+ // // https://github.com/kangax/html-minifier#options-quick-reference
136
+ // }
137
+ // }),
138
+ // 打包文件压缩
139
+ new FileManagerPlugin({
140
+ onEnd: onEndParam
141
+ })
142
+ ]
143
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.2.128",
3
+ "version": "3.2.131",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {