Skip to content

Commit

Permalink
fix: Schematics transpile after build
Browse files Browse the repository at this point in the history
  • Loading branch information
boeckMt committed Oct 21, 2024
1 parent 79ee484 commit 7ccb75e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
### Bug Fixes
* **@dlr-eoc/core-ui:**
- Update styles for `@clr 17`
- Schemantic add path in tsconfig no baseUrl
- Schematics add path in tsconfig no baseUrl
- Replace not found import `IconShapeTuple` from `@cds/core`
- Schematics transpile after build because custom buiulder was removed in [v14.0.0](https://github.com/dlr-eoc/ukis-frontend-libraries/tree/v14.0.0/projects/core-ui/schematics).

* **@dlr-eoc/layer-control:**
- Fix direction of `@cds` icon
Expand Down
3 changes: 2 additions & 1 deletion projects/core-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"scripts": {
"build": "ng build core-ui --configuration=production --watch=false",
"schematics:build": "tsc -p tsconfig.schematics.json",
"preschematics:test": "npm run build && npm run schematics:build",
"postbuild": "npm run schematics:build",
"preschematics:test": "npm run build",
"schematics:test": "npx jasmine ../../dist/core-ui/schematics/**/*_spec.js"
},
"ng-add": {
Expand Down
19 changes: 16 additions & 3 deletions scripts/library/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* node scripts/projectsVersion.js -l
*/

import { fork } from 'child_process';
import { fork, spawn } from 'child_process';
import { join } from 'path';
import { existsSync } from 'fs';
import { Command } from 'commander';
Expand Down Expand Up @@ -112,8 +112,21 @@ function runBuilds(offset = 0, projects) {
const project = projects[offset];
const cliArgs = ['build', '--configuration=production', '--watch=false', project];
if (project) {
console.log(consoleLogColors.Bright, `---------------------->>> ${offset + 1}: run ng ${cliArgs.join(' ')}`);
const child = fork(`${__dirname}/run-ng.js`, cliArgs);

const packageJson: IPackageJSON = require(join(CWD, ANGULARJSON.projects[project].root, 'package.json'));
let child = null;
if(packageJson && packageJson.scripts && packageJson.scripts['build']){
const spawnCliArgs = ['run', 'build', `--workspace=projects/${project}`];
console.log(consoleLogColors.Bright, `---------------------->>> ${offset + 1}: npm ${spawnCliArgs.join(' ')}`);
let command = 'npm';
if (process.platform !== 'win32') {
command = 'npm.cmd'
}
child = spawn(command, spawnCliArgs, { stdio: "inherit", shell: true });
}else{
console.log(consoleLogColors.Bright, `---------------------->>> ${offset + 1}: run ng ${cliArgs.join(' ')}`);
child = fork(`${__dirname}/run-ng.js`, cliArgs);
}
child.on('close', (code, signal) => {
offset++;
if (offset >= projects.length) {
Expand Down

0 comments on commit 7ccb75e

Please sign in to comment.