Skip to content

Commit

Permalink
build es5 and es6 packages
Browse files Browse the repository at this point in the history
  • Loading branch information
reeli committed Sep 19, 2019
1 parent 8918b08 commit 84c915b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ yarn.lock
wsEndpoint
.output/
dist/
lib/
module/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/__tests__/**
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
"name": "swagger-faker",
"version": "0.6.0",
"description": "Generate fake data from swagger",
"main": "dist/index.js",
"main": "lib/index.js",
"module": "module/index.js",
"files": [
"dist",
"lib",
"module",
"src",
"README.md"
],
"scripts": {
"start": " ts-node examples/fakerGen.ts",
"test": "jest",
"build": "rm -rf dist/ && tsc",
"prepare": "npm run build && npm test"
"release": "npm run build:es5 && npm run build:es6",
"build:es5": "rm -rf lib && tsc --build ./tsconfig.build.es5.json",
"build:es6": "rm -rf module && tsc --build ./tsconfig.build.es6.json",
"prepare": "npm run release && npm test"
},
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.build.es5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"outDir": "lib"
}
}
8 changes: 8 additions & 0 deletions tsconfig.build.es6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"module": "es6",
"outDir": "module"
}
}

0 comments on commit 84c915b

Please sign in to comment.