Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit a7dc32b

Browse files
committed
add umd build
1 parent 8a3e3a1 commit a7dc32b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
.nyc_output
3-
coverage
3+
coverage
4+
dist

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"compileEnhancements": false,
1616
"babel": false
1717
},
18+
"unpkg": "./dist/main.js",
19+
"umd:main": "./dist/main.js",
1820
"browser": {
1921
"./src/deploy/index.js": "./src/deploy/index.browser.js"
2022
},
@@ -68,7 +70,9 @@
6870
"npm-run-all": "^4.1.3",
6971
"nyc": "^13.0.1",
7072
"prettier": "^1.13.7",
71-
"tape": "^4.9.1"
73+
"tape": "^4.9.1",
74+
"webpack": "^4.20.2",
75+
"webpack-cli": "^3.1.2"
7276
},
7377
"engines": {
7478
"node": ">=8.0.0"
@@ -90,7 +94,9 @@
9094
"scripts": {
9195
"build": "run-s build:*",
9296
"build:deptree": "depcruise --exclude '^node_modules' --output-type dot src | dot -T svg > site/dist/dependencygraph.svg",
97+
"build:webpack": "webpack --mode production --devtool source-map --output-library NetlifyClient --output-library-target umd",
9398
"ci": "run-s test build",
99+
"prepublishOnly": "npm run build:webpack",
94100
"report": "nyc report --reporter=text-lcov | coveralls",
95101
"test": "run-s test:*",
96102
"test:ava": "nyc --reporter=lcov ava --verbose && nyc report",

0 commit comments

Comments
 (0)