mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 21:03:03 -05:00
chore(version): update to version 16
This commit is contained in:
@@ -27,9 +27,11 @@ const cp = require('child_process');
|
||||
const isWindows = os.platform() === 'win32';
|
||||
let output;
|
||||
try {
|
||||
output = require('@nrwl/workspace').output;
|
||||
output = require('@nx/workspace').output;
|
||||
} catch (e) {
|
||||
console.warn('Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.');
|
||||
console.warn(
|
||||
'Angular CLI could not be decorated to enable computation caching. Please ensure @nx/workspace is installed.'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
@@ -46,16 +48,20 @@ function symlinkNgCLItoNxCLI() {
|
||||
* This is the most reliable way to create symlink-like behavior on Windows.
|
||||
* Such that it works in all shells and works with npx.
|
||||
*/
|
||||
['', '.cmd', '.ps1'].forEach(ext => {
|
||||
if (fs.existsSync(nxPath + ext)) fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
|
||||
['', '.cmd', '.ps1'].forEach((ext) => {
|
||||
if (fs.existsSync(nxPath + ext))
|
||||
fs.writeFileSync(ngPath + ext, fs.readFileSync(nxPath + ext));
|
||||
});
|
||||
} else {
|
||||
// If unix-based, symlink
|
||||
cp.execSync(`ln -sf ./nx ${ngPath}`);
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
output.error({ title: 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e.message });
|
||||
} catch (e) {
|
||||
output.error({
|
||||
title:
|
||||
'Unable to create a symlink from the Angular CLI to the Nx CLI:' +
|
||||
e.message,
|
||||
});
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -63,7 +69,11 @@ function symlinkNgCLItoNxCLI() {
|
||||
try {
|
||||
symlinkNgCLItoNxCLI();
|
||||
require('nx/src/adapter/decorate-cli').decorateCli();
|
||||
output.log({ title: 'Angular CLI has been decorated to enable computation caching.' });
|
||||
} catch(e) {
|
||||
output.error({ title: 'Decoration of the Angular CLI did not complete successfully' });
|
||||
output.log({
|
||||
title: 'Angular CLI has been decorated to enable computation caching.',
|
||||
});
|
||||
} catch (e) {
|
||||
output.error({
|
||||
title: 'Decoration of the Angular CLI did not complete successfully',
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user