Skip to content

Commit 204c8ef

Browse files
kevinphelpsmgechev
authored andcommittedApr 26, 2018
build: make build scripts work on Windows (#581)
fixes #454
1 parent ad57552 commit 204c8ef

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed
 

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ dist
55
npm-debug.log
66
.vscode
77
yarn.lock
8+
*.log
89

‎package-lock.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"format:fix": "npm run format:base -- --write",
1111
"lint": "tslint -c tslint.json \"src/**/*.ts\" \"test/**/*.ts\"",
1212
"lint:fix": "npm run lint -- --fix",
13-
"release": "npm run build && rimraf dist && tsc -p tsconfig-release.json && npm run copy:common && npm run prepare:package && BUILD_TYPE=prod npm run set:vars",
13+
"release": "npm run build && rimraf dist && tsc -p tsconfig-release.json && npm run copy:common && npm run prepare:package && cross-env BUILD_TYPE=prod npm run set:vars",
1414
"build": "rimraf dist && tsc && npm run format:check && npm run lint && npm t",
15-
"copy:common": "cp README.md dist",
15+
"copy:common": "ncp README.md dist/README.md",
1616
"prepare:package": "cat package.json | ts-node build/package.ts > dist/package.json",
17-
"test": "rimraf dist && tsc && cp -r test/fixtures dist/test && mocha dist/test --recursive",
18-
"test:watch": "rimraf dist && tsc && cp -r test/fixtures dist/test && BUILD_TYPE=dev npm run set:vars && mocha dist/test --watch --recursive",
17+
"test": "rimraf dist && tsc && ncp test/fixtures dist/test/fixtures && mocha dist/test --recursive",
18+
"test:watch": "rimraf dist && tsc && ncp test/fixtures dist/test/fixtures && cross-env BUILD_TYPE=dev npm run set:vars && mocha dist/test --watch --recursive",
1919
"set:vars": "ts-node build/vars.ts --src ./dist",
2020
"tscv": "tsc --version",
2121
"tsc": "tsc",
@@ -68,14 +68,17 @@
6868
"@types/node": "^6.0.103",
6969
"@types/node-sass": "^3.10.31",
7070
"@types/sprintf-js": "0.0.27",
71+
"cat": "^0.2.0",
7172
"chai": "^3.5.0",
7273
"chai-spies": "^0.7.1",
74+
"cross-env": "^5.1.4",
7375
"husky": "^0.14.3",
7476
"js-yaml": "^3.11.0",
7577
"json-stringify-pretty-compact": "^1.1.0",
7678
"lint-staged": "^7.0.4",
7779
"minimalist": "1.0.0",
7880
"mocha": "3.0.2",
81+
"ncp": "^2.0.0",
7982
"node-sass": "^4.8.3",
8083
"prettier": "1.12.1",
8184
"rimraf": "^2.6.2",

‎yarn.lock

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ caseless@~0.12.0:
384384
version "0.12.0"
385385
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
386386

387+
cat@^0.2.0:
388+
version "0.2.0"
389+
resolved "https://registry.yarnpkg.com/cat/-/cat-0.2.0.tgz#fd850cda7d4162e6904f33b7fcf743b1243fd434"
390+
387391
chai-spies@^0.7.1:
388392
version "0.7.1"
389393
resolved "https://registry.yarnpkg.com/chai-spies/-/chai-spies-0.7.1.tgz#343d99f51244212e8b17e64b93996ff7b2c2a9b1"
@@ -532,14 +536,21 @@ cosmiconfig@^4.0.0:
532536
parse-json "^4.0.0"
533537
require-from-string "^2.0.1"
534538

539+
cross-env@^5.1.4:
540+
version "5.1.4"
541+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.4.tgz#f61c14291f7cc653bb86457002ea80a04699d022"
542+
dependencies:
543+
cross-spawn "^5.1.0"
544+
is-windows "^1.0.0"
545+
535546
cross-spawn@^3.0.0:
536547
version "3.0.1"
537548
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982"
538549
dependencies:
539550
lru-cache "^4.0.1"
540551
which "^1.2.9"
541552

542-
cross-spawn@^5.0.1:
553+
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
543554
version "5.1.0"
544555
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
545556
dependencies:
@@ -1494,7 +1505,7 @@ is-utf8@^0.2.0:
14941505
version "0.2.1"
14951506
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
14961507

1497-
is-windows@^1.0.2:
1508+
is-windows@^1.0.0, is-windows@^1.0.2:
14981509
version "1.0.2"
14991510
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
15001511

@@ -2149,6 +2160,10 @@ natural-compare@^1.4.0:
21492160
version "1.4.0"
21502161
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
21512162

2163+
ncp@^2.0.0:
2164+
version "2.0.0"
2165+
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
2166+
21522167
node-gyp@^3.3.1:
21532168
version "3.4.0"
21542169
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.4.0.tgz#dda558393b3ecbbe24c9e6b8703c71194c63fa36"

0 commit comments

Comments
 (0)