提交 432bf077 编写于 作者: M Mislav Marohnić

Build UMD dist file with Rollup

上级 0a574877
.env
package-lock.json
dist/
bower_components/
node_modules/
sauce_connect/
......
test: node_modules/ lint
test: lint dist/fetch.umd.js
./script/test
lint: node_modules/
./node_modules/.bin/eslint --report-unused-disable-directives *.js test/*.js
dist/fetch.umd.js: fetch.js rollup.config.js node_modules/
./node_modules/.bin/rollup -c
node_modules/:
npm install
......
......@@ -2,7 +2,8 @@
"name": "whatwg-fetch",
"description": "A window.fetch polyfill.",
"version": "2.0.3",
"main": "fetch.js",
"main": "./dist/fetch.umd.js",
"module": "./fetch.js",
"repository": "github/fetch",
"license": "MIT",
"devDependencies": {
......@@ -12,13 +13,16 @@
"mocha": "2.1.0",
"mocha-phantomjs-core": "2.0.1",
"promise-polyfill": "6.0.2",
"rollup": "^0.59.1",
"url-search-params": "0.6.1"
},
"files": [
"LICENSE",
"dist/fetch.umd.js",
"fetch.js"
],
"scripts": {
"prepublish": "make dist/fetch.umd.js",
"test": "make"
}
}
export default {
input: 'fetch.js',
output: {
file: 'dist/fetch.umd.js',
format: 'umd',
name: 'WHATWGFetch'
}
}
......@@ -34,7 +34,7 @@
<script src="/node_modules/promise-polyfill/promise.js"></script>
<script src="/test/test.js"></script>
<script src="/fetch.js"></script>
<script src="/dist/fetch.umd.js"></script>
<script>
var runner = mocha.run();
......
......@@ -6,7 +6,7 @@ self.assert = chai.assert
importScripts('/node_modules/promise-polyfill/promise.js')
importScripts('/test/test.js')
importScripts('/fetch.js')
importScripts('/dist/fetch.umd.js')
function title(test) {
return test.fullTitle().replace(/#/g, '')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册