Skip to content

Commit

Permalink
feat: produce es, common, and umd bundles (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyOGo authored May 18, 2020
1 parent c0f78cc commit 62cabf5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/node_modules
build/
dist/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ umd/
coverage/
.nyc_output/
.vscode/
.rts2*
dist/
package-lock.json
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "retry-axios",
"version": "0.0.0",
"description": "Retry HTTP requests with Axios.",
"main": "./build/src/index.js",
"types": "./build/src/index.d.ts",
"source": "src/index.ts",
"main": "dist/index.js",
"module": "dist/index.module.js",
"unpkg": "dist/index.umd.js",
"types": "dist/src/index.d.ts",
"engines": {
"node": ">=10.0.0"
},
Expand All @@ -15,10 +18,11 @@
"lint": "gts check",
"clean": "gts clean",
"fix": "gts fix",
"compile": "tsc -p .",
"compile": "tsc --target ES5 --module CommonJS",
"build-web": "microbundle",
"umd": "rm -rf umd && babel build/src -d umd --source-maps",
"test": "c8 mocha build/test",
"prepare": "npm run compile",
"prepare": "npm run build-web",
"pretest": "npm run compile",
"license-check": "jsgl --local ."
},
Expand All @@ -35,7 +39,6 @@
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@types/mocha": "^7.0.0",
"@types/nock": "^10.0.3",
Expand All @@ -45,17 +48,19 @@
"c8": "^7.0.0",
"gts": "^2.0.0",
"js-green-licenses": "^2.0.0",
"microbundle": "^0.11.0",
"mocha": "^7.0.0",
"nock": "^12.0.0",
"semantic-release": "^17.0.4",
"typescript": "~3.9.0"
},
"files": [
"build/src"
"dist"
],
"c8": {
"exclude": [
"build/test"
"build/test",
"dist"
]
},
"browserslist": "> 1%, last 2 versions, Firefox ESR"
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "build"
"outDir": "build",
"moduleResolution": "node",
"module": "ES2015"
},
"include": [
"src/*.ts",
Expand Down

0 comments on commit 62cabf5

Please sign in to comment.