Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
riophae committed Aug 24, 2019
1 parent 5013d4e commit 92e6d1c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ exports.styleLoaders = (options = {}) => {
}
}

exports.withCacheLoader = (rule, opts = {}) => {
if (opts.disableCacheInTest && process.env.NODE_ENV === 'testing') {
exports.withCacheLoader = rule => {
if (process.env.NODE_ENV === 'testing') {
return rule
}

Expand Down
2 changes: 0 additions & 2 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ module.exports = {
test: /\.js$/,
loader: 'babel-loader',
include: [ 'src', 'docs', 'test' ].map(utils.resolve),
}, {
disableCacheInTest: true,
}),
utils.withCacheLoader({
test: /\.pug$/,
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.bundle.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const webpackConfig = merge(base, {
],
},
externals: [ nodeExternals() ],
devtool: config.bundle.dev.productionSourceMap ? '#source-map' : false,
devtool: config.bundle.dev.productionSourceMap ? 'source-map' : false,
plugins: [
new MiniCssExtractPlugin({
filename: config.bundle.dev.cssFilename,
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.bundle.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const webpackConfig = merge(base, {
externals: {
vue: 'Vue',
},
devtool: config.bundle.prod.productionSourceMap ? '#source-map' : false,
devtool: config.bundle.prod.productionSourceMap ? 'source-map' : false,
plugins: [
new MiniCssExtractPlugin({
filename: config.bundle.prod.cssFilename,
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = merge(baseWebpackConfig, {
],
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
devtool: 'cheap-module-eval-source-map',
optimization: {
noEmitOnErrors: true,
},
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.docs.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const webpackConfig = merge(baseWebpackConfig, {
}),
],
},
devtool: config.docs.productionSourceMap ? '#source-map' : false,
devtool: config.docs.productionSourceMap ? 'source-map' : false,
plugins: [
// extract css into its own file
new MiniCssExtractPlugin({
Expand Down
6 changes: 4 additions & 2 deletions build/webpack.test.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const webpackConfig = merge(baseConfig, {
utils.styleLoaders(),
],
},
// use inline sourcemap for karma-sourcemap-loader
devtool: '#inline-source-map',
// <del>use inline sourcemap for karma-sourcemap-loader</del>
// devtool: 'inline-source-map',
// devtool: 'eval',
devtool: false,
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/test.env'),
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"dev": "node build/dev-server.js",
"bundle": "node build/bundle.js",
"docs": "rimraf gh-pages && mkdir gh-pages && node build/build.js",
"unit": "karma start test/unit/karma.conf.js --watch",
"cleanup-cov": "rimraf test/unit/coverage",
"unit": "npm run cleanup-cov && karma start test/unit/karma.conf.js --watch",
"gh-pages": "npm run docs && gh-pages --dist gh-pages --branch gh-pages --dotfiles",
"testonly": "karma start test/unit/karma.conf.js --single-run",
"testonly": "npm run cleanup-cov && karma start test/unit/karma.conf.js --single-run",
"test": "npm run testonly",
"pretest": "npm run lint",
"lint:js": "eslint --ext .js --ext .vue --cache --cache-location node_modules/.cache/eslint --rule 'no-console: 2' .",
Expand Down Expand Up @@ -77,7 +78,7 @@
"jstransformer-markdown-it": "^2.0.0",
"karma": "^4.0.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^1.1.1",
"karma-coverage": "^2.0.1",
"karma-jasmine": "^2.0.0",
"karma-jasmine-matchers": "^4.0.1",
"karma-sourcemap-loader": "^0.3.7",
Expand Down

0 comments on commit 92e6d1c

Please sign in to comment.