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; }