Browse Source
Merge pull request #6339 from vvlladd28/bug/build-ui/windows
[3.4] UI: Fixed generate types and build in Windows OS
pull/6432/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
4 deletions
-
ui-ngx/.yarnrc
-
ui-ngx/generate-types.js
|
|
|
@ -0,0 +1 @@ |
|
|
|
network-timeout 1000000 |
|
|
|
@ -17,9 +17,12 @@ |
|
|
|
const child_process = require("child_process"); |
|
|
|
const fs = require('fs'); |
|
|
|
const path = require('path'); |
|
|
|
const typeDir = './target/types'; |
|
|
|
const srcDir = typeDir + '/src'; |
|
|
|
const moduleMapPath = "src/app/modules/common/modules-map.ts"; |
|
|
|
|
|
|
|
const typeDir = path.join('.', 'target', 'types'); |
|
|
|
const srcDir = path.join('.', 'target', 'types', 'src'); |
|
|
|
const moduleMapPath = path.join('src', 'app', 'modules', 'common', 'modules-map.ts'); |
|
|
|
const ngcPath = path.join('.', 'node_modules', '.bin', 'ngc'); |
|
|
|
const tsconfigPath = path.join('src', 'tsconfig.app.json'); |
|
|
|
|
|
|
|
console.log(`Remove directory: ${typeDir}`); |
|
|
|
try { |
|
|
|
@ -28,7 +31,7 @@ try { |
|
|
|
console.error(`Remove directory error: ${err}`); |
|
|
|
} |
|
|
|
|
|
|
|
const cliCommand = `./node_modules/.bin/ngc --p src/tsconfig.app.json --declaration --outDir ${srcDir}`; |
|
|
|
const cliCommand = `${ngcPath} --p ${tsconfigPath} --declaration --outDir ${srcDir}`; |
|
|
|
console.log(cliCommand); |
|
|
|
try { |
|
|
|
child_process.execSync(cliCommand); |
|
|
|
|