Skip to content

Commit

Permalink
Properly build a minified browser version
Browse files Browse the repository at this point in the history
  • Loading branch information
slaskis committed Apr 1, 2017
1 parent 062c4e0 commit 33f6b1f
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 56 deletions.
12 changes: 12 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"env",
{
"targets": {
"ie": 10
}
}
]
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ node_modules

.DS_Store

browser.js
svgsus.min.js
svgsus.min.js.map
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"bin": {
"svgsus": "./bin/svgsus"
},
"unpkg": "browser.js",
"unpkg": "svgsus.min.js",
"scripts": {
"test": "standard && ava",
"lint": "standard",
"build": "browserify index.js -s svgsus -o browser.js",
"prepublish": "npm test && npm run build"
"build": "browserify index.js -t babelify -g uglifyify --debug -s svgsus | exorcist svgsus.min.js.map > svgsus.min.js",
"prepublish": "npm test && npm run build --production"
},
"homepage": "http://www.svgs.us",
"repository": "department-stockholm/svgsus",
Expand All @@ -28,9 +28,13 @@
"devDependencies": {
"ava": "^0.18.2",
"babel-eslint": "^7.0.0",
"babel-preset-env": "^1.3.2",
"babelify": "^7.3.0",
"browserify": "^14.1.0",
"execa": "^0.6.3",
"standard": "^9.0.2"
"exorcist": "^0.4.0",
"standard": "^9.0.2",
"uglifyify": "^3.0.4"
},
"dependencies": {
"css-select": "1.2.0",
Expand Down
Loading

0 comments on commit 33f6b1f

Please sign in to comment.