Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Create dual ES5 and ES2017 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed May 2, 2020
1 parent b19afe7 commit c749d24
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package-lock.json
node_modules
dist/
dist
dist.browser
.nyc_output
coverage
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
.vscode
package.json
dist
dist.browser
.nyc_output
*.json
docs
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist/**/*"
"dist",
"dist.browser"
],
"browser": "dist.browser/index.js",
"scripts": {
"benchmarks": "npm run build && ts-node benchmarks/index.ts",
"build": "ethereumjs-config-build",
"build": "tsc -p tsconfig.json && tsc -p tsconfig.browser.json",
"prepublishOnly": "npm run test && npm run build",
"coverage": "nyc --reporter=lcov npm run test:node",
"docs:build": "npx typedoc",
"docs:build": "typedoc",
"lint": "ethereumjs-config-lint",
"lint:fix": "ethereumjs-config-lint-fix",
"format": "ethereumjs-config-format",
Expand All @@ -21,7 +23,7 @@
"tsc": "ethereumjs-config-tsc",
"test": "npm run test:node && npm run test:browser",
"test:browser": "npm run build && karma start karma.conf.js",
"test:node": "npm run build && tape -r ts-node/register test/*.ts | tap-prettify -"
"test:node": "npm run build && tape -r ts-node/register test/*.ts"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -70,7 +72,6 @@
"karma-typescript": "^5.0.1",
"nyc": "^15.0.0",
"prettier": "^2.0.2",
"tap-prettify": "^0.0.2",
"tape": "^4.13.2",
"ts-node": "^8.8.1",
"tslint": "^5.18.0",
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.browser.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist.browser",
},
"target": "es5",
"lib": ["dom", "es5"]
}

4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"extends": "@ethereumjs/config-tsc",
"compilerOptions": {
"outDir": "./dist"
},
"include": ["src/**/*.ts"],
"target": "ES2017"
}
7 changes: 0 additions & 7 deletions tsconfig.prod.json

This file was deleted.

0 comments on commit c749d24

Please sign in to comment.