Skip to content

Commit 25973a9

Browse files
committed
also produce a UMD bundle
1 parent 6bd5bd5 commit 25973a9

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
/dist.js
1+
/dist
22
/node_modules
33
/npm-debug.log

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
"name": "dlv",
33
"version": "1.0.1",
44
"description": "Safely get a dot-notated property within an object.",
5-
"main": "dist.js",
5+
"main": "dist/dlv.js",
6+
"browser": "dist/dlv.umd.js",
67
"jsnext:main": "index.js",
78
"scripts": {
8-
"build": "rollup -f cjs --no-strict $npm_package_jsnext_main | uglifyjs -cm -o $npm_package_main",
9+
"build": "mkdir -p dist && npm run -s build:cjs && npm run -s build:umd",
10+
"build:cjs": "rollup -i $npm_package_jsnext_main -f cjs --no-strict | uglifyjs -cm -o $npm_package_main",
11+
"build:umd": "rollup -i $npm_package_jsnext_main -n $npm_package_name -f umd --no-strict | uglifyjs -cm -o $npm_package_browser",
912
"prepublish": "npm run build",
1013
"test": "node test",
1114
"release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
@@ -17,9 +20,10 @@
1720
],
1821
"files": [
1922
"index.js",
20-
"dist.js"
23+
"dist"
2124
],
22-
"author": "Jason Miller <[email protected]>",
25+
"author": "Jason Miller <[email protected]> (http://jasonformat.com)",
26+
"repository": "developit/dlv",
2327
"license": "MIT",
2428
"devDependencies": {
2529
"rollup": "^0.34.3",

0 commit comments

Comments
 (0)