Skip to content

Commit

Permalink
CHANGE #2 ignore node-method on webpack-builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pubkey committed Jul 11, 2018
1 parent 46f6244 commit 9b6452f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ script:
- travis_retry npm run test:browser
- travis_retry npm run test:e2e
- npm run test:typings
- npm run test:size
- npm run size:webpack
- npm run size:browserify
4 changes: 0 additions & 4 deletions config/.eslintignore

This file was deleted.

18 changes: 18 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = {
mode: 'production',
entry: './dist/es/browserify.index.js',
optimization: {
minimizer: [
new UglifyJsPlugin()
]
},
plugins: [],
output: {
path: path.resolve(__dirname, '../test_tmp'),
filename: 'webpack.bundle.js'
}
};
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
"test:browser": "npm run build && karma start ./config/karma.conf.js --single-run",
"test:e2e": "concurrently \"npm run docs:serve\" \"testcafe all test/e2e.test.js\" --kill-others --success first",
"test:typings": "npm run build && mocha ./test/typings.test.js -b --timeout 12000 --exit",
"test:size": "npm run build && rimraf test_tmp/browserify.js && browserify --no-builtins dist/lib/browserify.index.js > test_tmp/browserify.js && uglifyjs --compress --mangle --output test_tmp/browserify.min.js -- test_tmp/browserify.js && echo \"Build-Size (minified+gzip):\" && gzip-size --raw test_tmp/browserify.min.js",
"lint": "eslint --ignore-path ./config/.eslintignore src test config scripts",
"size:prewebpack": "npm run build && cross-env NODE_ENV=build webpack --config ./config/webpack.config.js",
"size:webpack": "npm run size:prewebpack && echo \"Build-Size Webpack (minified+gzip):\" && gzip-size --raw ./test_tmp/webpack.bundle.js",
"size:browserify": "npm run build && rimraf test_tmp/browserify.js && browserify --no-builtins dist/lib/browserify.index.js > test_tmp/browserify.js && uglifyjs --compress --mangle --output test_tmp/browserify.min.js -- test_tmp/browserify.js && echo \"Build-Size browserify (minified+gzip):\" && gzip-size --raw test_tmp/browserify.min.js",
"lint": "eslint src test config",
"clear": "rimraf -rf ./dist && rimraf -rf ./gen",
"build:es6": "rimraf -rf dist/es && cross-env NODE_ENV=es6 babel src --out-dir dist/es",
"build:es5": "cross-env NODE_ENV=es5 node node_modules/babel-cli/bin/babel.js src --out-dir dist/lib",
Expand Down Expand Up @@ -91,7 +93,7 @@
"convert-hrtime": "2.0.0",
"copyfiles": "2.0.0",
"cross-env": "5.2.0",
"eslint": "4.19.1",
"eslint": "5.1.0",
"gzip-size-cli": "3.0.0",
"http-server": "0.11.1",
"karma": "2.0.4",
Expand All @@ -114,6 +116,12 @@
"testcafe": "0.20.4",
"testcafe-hammerhead": "14.1.1",
"ts-node": "7.0.0",
"typescript": "2.9.2"
"typescript": "2.9.2",
"webpack": "4.16.0",
"webpack-cli": "3.0.8"
},
"browser": {
"./dist/es/methods/node.js": false,
"./dist/lib/methods/node.js": false
}
}

0 comments on commit 9b6452f

Please sign in to comment.