safecheck-client 4.0.2-45 → 4.0.2-48

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.
@@ -1,44 +0,0 @@
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
- const ExtractTextPlugin = require("extract-text-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
- module.exports = merge(baseConfig, {
13
- // eval-source-map is faster for development
14
- devtool: 'eval-cheap-module-source-map',
15
- output: {
16
- // necessary for the html plugin to work properly
17
- // when serving the html from in-memory
18
- publicPath: '/'
19
- },
20
- stats: {
21
- // all: false, // 关闭全部日志
22
- colors: true, // 配置控制台输出彩色日志
23
- // errors: true, // 输出构建错误日志
24
- // warnings: true, // 输出构建警告日志
25
- // moduleTrace: true, // 显示 module 路径信息
26
- // errorDetails: true, // 显示构建错误的详细信息
27
- chunks: false, // 不输出构建 chunk 信息
28
- // entrypoints: false, // 不输出入口文件信息
29
- children: false, // 不输出子模块构建信息
30
- // performance: true // 输出性能提示
31
- },
32
- plugins: [
33
- new webpack.HotModuleReplacementPlugin(),
34
- new webpack.NoEmitOnErrorsPlugin(),
35
- new ExtractTextPlugin('[name].css'),
36
- // https://github.com/ampedandwired/html-webpack-plugin
37
- new HtmlWebpackPlugin({
38
- filename: 'index.html',
39
- template: 'index.html',
40
- inject: true,
41
- date: new Date().getTime()
42
- })
43
- ]
44
- })
@@ -1,33 +0,0 @@
1
- var webpack = require('webpack')
2
- var merge = require('webpack-merge')
3
- var baseConfig = require('./webpack.baseandroid.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: 'source-map',
14
- //devtool: '#eval-source-map',
15
- output: {
16
- // necessary for the html plugin to work properly
17
- // when serving the html from in-memory
18
- publicPath: '/'
19
- },
20
- plugins: [
21
- // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
22
- new webpack.optimize.OccurenceOrderPlugin(),
23
- new webpack.HotModuleReplacementPlugin(),
24
- new webpack.NoErrorsPlugin(),
25
- // https://github.com/ampedandwired/html-webpack-plugin
26
- //plugin trick
27
- new HtmlWebpackPlugin({
28
- filename: 'android.html',
29
- template: 'android.html',
30
- inject: true
31
- })
32
- ]
33
- })
@@ -1,49 +0,0 @@
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,57 +0,0 @@
1
- var fs = require('fs')
2
- var webpack = require('webpack')
3
- var merge = require('webpack-merge')
4
- var baseConfig = require('./webpack.hwbase.conf')
5
- var HtmlWebpackPlugin = require('html-webpack-plugin')
6
- var cssLoaders = require('./css-loaders')
7
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
8
-
9
- // 把examples下所有index.html转换成测试例子.html
10
- fs.readdirSync('./src/components/hanwei').forEach((file) => {
11
- baseConfig.plugins.push(
12
- new HtmlWebpackPlugin({
13
- filename: '../' + file + '.html',
14
- template: `src/components/hanwei/${file}/index.html`,
15
- inject: false,
16
- hash: true
17
- })
18
- )
19
- })
20
-
21
- // 把examples下子目录里的main.js打包成对应组件名的App.js
22
- fs.readdirSync('./src/components/hanwei').forEach((file) => {
23
- baseConfig.entry[file + 'App'] = `./src/components/hanwei/${file}/main.js`
24
- })
25
-
26
- var SOURCE_MAP = true
27
- module.exports = merge(baseConfig, {
28
- stats: {
29
- children: false
30
- },
31
- devtool: SOURCE_MAP ? '#source-map' : false,
32
- output: {
33
- filename: '[name].js',
34
- chunkFilename: '[id].[chunkhash].js'
35
- },
36
- vue: {
37
- loaders: cssLoaders({
38
- sourceMap: SOURCE_MAP,
39
- extract: true
40
- })
41
- },
42
- plugins: [
43
- new webpack.DefinePlugin({
44
- 'process.env': {
45
- NODE_ENV: '"production"'
46
- }
47
- }),
48
- new webpack.optimize.UglifyJsPlugin({
49
- compress: {
50
- warnings: false
51
- }
52
- }),
53
- new webpack.optimize.OccurenceOrderPlugin(),
54
- // extract css into its own file
55
- new ExtractTextPlugin('[name].css')
56
- ]
57
- })
@@ -1,78 +0,0 @@
1
- var path = require('path')
2
- var cssLoaders = require('./css-loaders')
3
- var projectRoot = path.resolve(__dirname, '../')
4
-
5
- module.exports = {
6
- entry: {
7
- },
8
- output: {
9
- path: path.resolve(__dirname, '../dist/static'),
10
- publicPath: 'static/',
11
- filename: '[name].js'
12
- },
13
- resolve: {
14
- extensions: ['', '.js', '.vue'],
15
- fallback: [path.join(__dirname, '../node_modules')],
16
- alias: {
17
- 'src': path.resolve(__dirname, '../src')
18
- }
19
- },
20
- resolveLoader: {
21
- fallback: [path.join(__dirname, '../node_modules')]
22
- },
23
- module: {
24
- loaders: [
25
- {
26
- test: /\.vue$/,
27
- loader: 'vue'
28
- },
29
- {
30
- test: /\.js$/,
31
- loader: 'babel',
32
- include: [
33
- `${projectRoot}\\src`,
34
- `${projectRoot}\\build`,
35
- `${projectRoot}\\examples`,
36
- `${projectRoot}\\test`,
37
- `${projectRoot}\\node_modules\\vue-client\\src`,
38
- `${projectRoot}\\node_modules\\vue-strap\\src`,
39
- `${projectRoot}\\node_modules\\ol`
40
- ]
41
- },
42
- {
43
- test: /\.json$/,
44
- loader: 'json'
45
- },
46
- {
47
- test: /\.html$/,
48
- loader: 'vue-html'
49
- },
50
- {
51
- test: /\.less$/,
52
- loader: 'style!css!less'
53
- },
54
- {
55
- test: /\.(png|jpg|gif|svg|woff2?|eot|ttf)(\?.*)?$/,
56
- loader: 'url',
57
- query: {
58
- limit: 10000,
59
- name: '[name].[ext]?[hash:7]'
60
- }
61
- },
62
- {
63
- test: /\.css$/,
64
- loader: 'style!css'
65
- }
66
- ]
67
- },
68
- vue: {
69
- loaders: cssLoaders({
70
- sourceMap: false,
71
- extract: false
72
- })
73
- },
74
- plugins: [],
75
- eslint: {
76
- formatter: require('eslint-friendly-formatter')
77
- }
78
- }
@@ -1,78 +0,0 @@
1
- var webpack = require('webpack')
2
- var merge = require('webpack-merge')
3
- var baseConfig = require('./webpack.base.conf')
4
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
5
- var HtmlWebpackPlugin = require('html-webpack-plugin')
6
- const TerserPlugin = require('terser-webpack-plugin-legacy')
7
- const path = require("path");
8
- // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
9
- // whether to generate source map for production files.
10
- // disabling this can speed up the build.
11
- var SOURCE_MAP = false
12
- if (process.env.VUE_APP_PAGE === 'true') {
13
- console.log('page打包')
14
- baseConfig.entry.app = './src/iotMain.js'
15
- }
16
-
17
- module.exports = merge(baseConfig, {
18
- stats: {
19
- children: false
20
- },
21
- devtool: SOURCE_MAP ? '#source-map' : false,
22
- output: {
23
- path: path.resolve(__dirname, '../dist'),
24
- publicPath: './',
25
- // naming output files with hashes for better caching.
26
- // dist/index.html will be auto-generated with correct URLs.
27
- filename: 'static/[name][chunkhash].js',
28
- chunkFilename: 'static/[id].[chunkhash].js'
29
- },
30
- plugins: [
31
- // http://vuejs.github.io/vue-loader/workflow/production.html
32
- new webpack.DefinePlugin({
33
- 'process.env': {
34
- NODE_ENV: '"production"'
35
- }
36
- }),
37
- new webpack.optimize.CommonsChunkPlugin({
38
- name: 'vendor',
39
- minChunks: Infinity
40
- }),
41
- new webpack.optimize.CommonsChunkPlugin({
42
- name: 'runtime'
43
- }),
44
- // new BundleAnalyzerPlugin(),
45
- new TerserPlugin({
46
- parallel: true,
47
- cache: true,
48
- terserOptions: {
49
- parse: {
50
- ecma: 6
51
- }, compress: {
52
- ecma: 5,
53
- warnings: false,
54
- comparisons: false,
55
- inline: 2
56
- }
57
- }
58
- }),
59
- // extract css into its own file
60
- new ExtractTextPlugin('[name].css'),
61
- // generate dist index.html with correct asset hash for caching.
62
- // you can customize output by editing /index.html
63
- // see https://github.com/ampedandwired/html-webpack-plugin
64
- new HtmlWebpackPlugin({
65
- filename: './index.html',
66
- template: 'index.html',
67
- inject: true,
68
- minify: {
69
- removeComments: true,
70
- collapseWhitespace: true,
71
- removeAttributeQuotes: true
72
- // more options:
73
- // https://github.com/kangax/html-minifier#options-quick-reference
74
- },
75
- date: new Date().getTime()
76
- })
77
- ]
78
- })
@@ -1,60 +0,0 @@
1
- var webpack = require('webpack')
2
- var merge = require('webpack-merge')
3
- var baseConfig = require('./webpack.baseandroid.conf')
4
- var cssLoaders = require('./css-loaders')
5
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
6
- var HtmlWebpackPlugin = require('html-webpack-plugin')
7
-
8
- // whether to generate source map for production files.
9
- // disabling this can speed up the build.
10
- var SOURCE_MAP = true
11
-
12
- module.exports = merge(baseConfig, {
13
- stats: {
14
- children: false
15
- },
16
- devtool: SOURCE_MAP ? '#source-map' : false,
17
- output: {
18
- // naming output files with hashes for better caching.
19
- // dist/index.html will be auto-generated with correct URLs.
20
- filename: '[name].js',
21
- chunkFilename: '[id].js'
22
- },
23
- vue: {
24
- loaders: cssLoaders({
25
- sourceMap: SOURCE_MAP,
26
- extract: true
27
- })
28
- },
29
- plugins: [
30
- // http://vuejs.github.io/vue-loader/workflow/production.html
31
- new webpack.DefinePlugin({
32
- 'process.env': {
33
- NODE_ENV: '"production"'
34
- }
35
- }),
36
- new webpack.optimize.UglifyJsPlugin({
37
- compress: {
38
- warnings: false
39
- }
40
- }),
41
- new webpack.optimize.OccurenceOrderPlugin(),
42
- // extract css into its own file
43
- new ExtractTextPlugin('[name].css'),
44
- // generate dist index.html with correct asset hash for caching.
45
- // you can customize output by editing /index.html
46
- // see https://github.com/ampedandwired/html-webpack-plugin
47
- new HtmlWebpackPlugin({
48
- filename: '../index.html',
49
- template: 'android.html',
50
- inject: true,
51
- minify: {
52
- removeComments: true,
53
- collapseWhitespace: true,
54
- removeAttributeQuotes: true
55
- // more options:
56
- // https://github.com/kangax/html-minifier#options-quick-reference
57
- }
58
- })
59
- ]
60
- })
@@ -1,31 +0,0 @@
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