From b08855985066467e16a1ecc7cf2624ebbb6f68ad Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 29 May 2017 12:01:18 +0200 Subject: Rename build:bundle to build:umd --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index 5c352bc88..3628608bd 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "scripts": { "clean": "shx rm -rf _bundles lib", - "build:bundle": "webpack", + "build:umd": "webpack", "build:commonjs": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;", "build": "npm run clean && run-p build:*", "lint": "tslint src/**/*.ts", -- cgit v1.2.3 From 055763cd373c5203182bc269ee3f8f737a34ba8e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 29 May 2017 12:44:22 +0200 Subject: Add umd test command and separate public and private npm scripts --- package.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 3628608bd..ab6b4d928 100644 --- a/package.json +++ b/package.json @@ -10,18 +10,21 @@ "exchange" ], "scripts": { - "clean": "shx rm -rf _bundles lib", - "build:umd": "webpack", - "build:commonjs": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;", "build": "npm run clean && run-p build:*", "lint": "tslint src/**/*.ts", - "test": "run-s clean build:commonjs && mocha lib/test/**/*_test.js", + "test": "run-s build test:commonjs test:umd", "test:coverage": "nyc npm run test --all", + "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", + "testrpc": "testrpc -p 8545 --networkId 50", + + "clean": "shx rm -rf _bundles lib", + "build:umd": "webpack", + "build:commonjs": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;", + "test:commonjs": "mocha lib/test/**/*_test.js", + "test:umd": "shx rm -rf lib/src/* && mv _bundles/* lib/src && npm run test:commonjs", "docs:json": "typedoc --json docs/index.json .", "docs:generate": "typedoc --out docs .", - "docs:open": "opn docs/index.html", - "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", - "testrpc": "testrpc -p 8545 --networkId 50" + "docs:open": "opn docs/index.html" }, "config": { "artifacts": "Proxy Exchange TokenRegistry Token Mintable EtherToken" -- cgit v1.2.3 From 6213407f544e34c13a4d125136d14a1d888d8c6a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 29 May 2017 13:27:26 +0200 Subject: Refactor test commands --- package.json | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index ab6b4d928..b2c7d4b19 100644 --- a/package.json +++ b/package.json @@ -10,21 +10,27 @@ "exchange" ], "scripts": { - "build": "npm run clean && run-p build:*", + "build": "npm run clean && run-p build:*:prod", "lint": "tslint src/**/*.ts", - "test": "run-s build test:commonjs test:umd", + "test": "run-s build:dev test:commonjs test:umd", "test:coverage": "nyc npm run test --all", "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", "testrpc": "testrpc -p 8545 --networkId 50", - - "clean": "shx rm -rf _bundles lib", - "build:umd": "webpack", - "build:commonjs": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;", - "test:commonjs": "mocha lib/test/**/*_test.js", - "test:umd": "shx rm -rf lib/src/* && mv _bundles/* lib/src && npm run test:commonjs", "docs:json": "typedoc --json docs/index.json .", "docs:generate": "typedoc --out docs .", - "docs:open": "opn docs/index.html" + "docs:open": "opn docs/index.html", + + "clean": "shx rm -rf _bundles lib", + "build:dev": "npm run clean && run-p build:*:dev", + "build:umd:dev": "webpack", + "build:umd:prod": "webpack -p", + "build:commonjs:dev": "tsc; copyfiles -u 2 ./src/artifacts/*.json ../0x.js/lib/src/artifacts;", + "run_mocha": "mocha test_temp/test/**/*_test.js", + "test:commonjs": "run-s build:commonjs:dev setup_commonjs run_mocha tear_down", + "test:umd": "run-s build:*:dev setup_umd run_mocha tear_down", + "setup_commonjs": "shx cp -r lib test_temp", + "setup_umd": "shx mkdir -p test_temp/src && shx cp _bundles/* test_temp/src && shx cp -r lib/test test_temp/test", + "tear_down": "shx rm -rf test_temp" }, "config": { "artifacts": "Proxy Exchange TokenRegistry Token Mintable EtherToken" -- cgit v1.2.3 From fa156531bf2aad507a0e644655dc9f34f6fcff28 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 29 May 2017 13:36:48 +0200 Subject: Don't build before test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index b2c7d4b19..7f92dbb9a 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "build": "npm run clean && run-p build:*:prod", "lint": "tslint src/**/*.ts", - "test": "run-s build:dev test:commonjs test:umd", + "test": "run-s test:commonjs test:umd", "test:coverage": "nyc npm run test --all", "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", "testrpc": "testrpc -p 8545 --networkId 50", -- cgit v1.2.3 From 7bd3d87f7a7d7c54b08e3e62b8075ec569498c63 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 29 May 2017 15:54:52 +0200 Subject: Address feedback --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index 7f92dbb9a..3b29795a8 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "docs:generate": "typedoc --out docs .", "docs:open": "opn docs/index.html", - "clean": "shx rm -rf _bundles lib", + "clean": "shx rm -rf _bundles lib test_temp", "build:dev": "npm run clean && run-p build:*:dev", "build:umd:dev": "webpack", "build:umd:prod": "webpack -p", -- cgit v1.2.3