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

Commit

Permalink
Merge pull request #117 from ethereumjs/buildES2017
Browse files Browse the repository at this point in the history
Create dual ES5 and ES2017 builds
  • Loading branch information
ryanio committed May 7, 2020
2 parents a2b0b18 + 0663653 commit 9ee7869
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 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
8 changes: 5 additions & 3 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 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 9ee7869

Please sign in to comment.