Skip to content

Commit abb41cb

Browse files
committed
Generate uncompressed, minified browser bundle
1 parent 346dc73 commit abb41cb

File tree

7 files changed

+342
-4
lines changed

7 files changed

+342
-4
lines changed

lib/parser.js

Lines changed: 311 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/parser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/parser.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/parser.min.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test": "jasmine spec/*spec.js",
88
"perf": "node ./benchmark/perfTest3.js",
99
"lint": "eslint src/*.js spec/*.js",
10-
"bundle": "webpack",
10+
"bundle": "webpack && webpack --config webpack-prod.config.js",
1111
"coverage": "istanbul cover -x \"cli.js\" -x \"spec/*spec.js\" jasmine spec/*spec.js;",
1212
"coverage:check": "istanbul check-coverage --branch 90 --statement 90",
1313
"postinstall": "node tasks/postinstall.js"

webpack-prod.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"use strict";
2+
3+
module.exports = [
4+
{
5+
context: __dirname,
6+
entry: "./src/parser.js",
7+
mode: "production",
8+
devtool: "source-map",
9+
output: {
10+
path: __dirname,
11+
filename: "./lib/parser.min.js",
12+
library: "parser",
13+
libraryTarget: "var"
14+
},
15+
module: {
16+
rules: [
17+
{
18+
test: /\.js$/,
19+
loader: "babel-loader"
20+
}
21+
]
22+
},
23+
target: "web"
24+
}
25+
];

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = [
44
{
55
context: __dirname,
66
entry: "./src/parser.js",
7-
mode: "production",
7+
mode: "development",
88
devtool: "source-map",
99
output: {
1010
path: __dirname,

0 commit comments

Comments
 (0)