Skip to content

Commit d93c73b

Browse files
author
George Czabania
committed
Add minified browser bundle using webpack
1 parent 12d83c2 commit d93c73b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

colr.min.js

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: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "mocha -R spec test",
8-
"coverage": "mocha --require blanket -R html-cov > coverage.html"
8+
"coverage": "mocha --require blanket -R html-cov > coverage.html",
9+
"webpack": "webpack -p"
910
},
1011
"repository": {
1112
"type": "git",
@@ -36,9 +37,10 @@
3637
"devDependencies": {
3738
"benchmark": "^1.0.0",
3839
"blanket": "^1.1.7",
39-
"chroma-js": "^0.7.8",
40-
"color": "^0.9.0",
41-
"tinycolor2": "^1.1.2"
40+
"chroma-js": "^1.1.1",
41+
"color": "^0.10.1",
42+
"tinycolor2": "^1.1.2",
43+
"webpack": "^1.11.0"
4244
},
4345
"config": {
4446
"blanket": {
@@ -51,7 +53,9 @@
5153
"node": true,
5254
"mocha": true
5355
},
54-
"plugins": [ "react" ],
56+
"plugins": [
57+
"react"
58+
],
5559
"ecmaFeatures": {
5660
"jsx": true
5761
},

webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
entry: './index.js',
3+
output: {
4+
filename: 'colr.min.js',
5+
libraryTarget: 'var',
6+
library: 'colr',
7+
},
8+
};

0 commit comments

Comments
 (0)