From 115b12a09671218fe090b198f2cae560f06c293d Mon Sep 17 00:00:00 2001 From: Mathieu Brunot Date: Thu, 14 Feb 2019 16:55:17 +0100 Subject: [PATCH] fix(scripts): Fix #73 postinstall windows friendly (#82) --- package.json | 2 +- scripts/postinstall.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1321b64d..4351dd86 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "watch": "tsc -w -p tsconfig.json", "test": "npm run build && jasmine src/**/*_spec.js", "prepare": "npm run build", - "postinstall": "[ ! -f scripts/postinstall.js ] || node scripts/postinstall.js", + "postinstall": "node scripts/postinstall.js", "debug": "node --debug-brk ./node_modules/@angular/cli/bin/ng g command", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "reset.changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" diff --git a/scripts/postinstall.ts b/scripts/postinstall.ts index 48d41d20..858530b1 100644 --- a/scripts/postinstall.ts +++ b/scripts/postinstall.ts @@ -8,7 +8,7 @@ const fsReadFile = promisify(fs.readFile); export async function updateConfig() { const cwd = process.cwd(); - if (cwd.indexOf('node_modules/@nstudio/schematics') === -1) { + if (cwd.indexOf('node_modules/@nstudio/schematics') === -1 && cwd.indexOf('node_modules\\@nstudio\\schematics') === -1) { // ignore: local development return; }