diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-27 07:49:43 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-27 07:49:43 +0800 |
commit | c1fcbe3f04714c5ad1c560d88d03fe6e3e251864 (patch) | |
tree | 93018669f1b3b17bec930cddb656e3f865613318 /packages/sra-api | |
parent | efa67d87aa4f8d9d57883ee85b59f5aaf211eb12 (diff) | |
download | dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.tar dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.tar.gz dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.tar.bz2 dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.tar.lz dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.tar.xz dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.tar.zst dexon-sol-tools-c1fcbe3f04714c5ad1c560d88d03fe6e3e251864.zip |
Create API development environment and json distribution
Diffstat (limited to 'packages/sra-api')
-rw-r--r-- | packages/sra-api/package.json | 19 | ||||
-rw-r--r-- | packages/sra-api/tsconfig.json | 2 |
2 files changed, 14 insertions, 7 deletions
diff --git a/packages/sra-api/package.json b/packages/sra-api/package.json index 8cbe911f3..61fa392fb 100644 --- a/packages/sra-api/package.json +++ b/packages/sra-api/package.json @@ -8,16 +8,20 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { + "serve": "redoc-cli serve lib/api.json --watch", + "develop": "run-p build-json:watch serve", "lint": "tslint --project .", "test": "yarn run_mocha", + "redoc-cli": "redoc-cli", "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", - "run_mocha": - "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib test_temp scripts", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts" + "run_mocha": "mocha lib/test/**/*_test.js --exit", + "clean": "shx rm -rf lib", + "build": "tsc && yarn build-json", + "build-json": "ts-node scripts/buildJson.ts", + "build-json:watch": "chokidar 'src/**/*' -c 'yarn build-json' " }, "repository": { "type": "git", @@ -34,14 +38,17 @@ "@0xproject/tslint-config": "^1.0.4", "@loopback/openapi-v3-types": "^0.8.2", "@types/mocha": "^2.2.42", + "@types/node": "^10.5.3", "chai": "^4.0.1", - "copyfiles": "^1.2.0", + "chokidar-cli": "^1.2.0", "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", "mocha": "^4.0.1", + "npm-run-all": "^4.1.3", "nyc": "^11.0.1", "openapi-schema-validation": "^0.4.1", + "redoc-cli": "^0.6.1", "shx": "^0.2.2", + "ts-node": "^7.0.0", "tslint": "5.11.0", "typescript": "2.7.1" }, diff --git a/packages/sra-api/tsconfig.json b/packages/sra-api/tsconfig.json index e35816553..c56d255d5 100644 --- a/packages/sra-api/tsconfig.json +++ b/packages/sra-api/tsconfig.json @@ -3,5 +3,5 @@ "compilerOptions": { "outDir": "lib" }, - "include": ["./src/**/*", "./test/**/*"] + "include": ["./src/**/*"] } |