@@ -29,7 +29,9 @@ let output;
2929try {
3030 output = require ( '@nrwl/workspace' ) . output ;
3131} catch ( e ) {
32- console . warn ( 'Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.' ) ;
32+ console . warn (
33+ 'Angular CLI could not be decorated to enable computation caching. Please ensure @nrwl/workspace is installed.'
34+ ) ;
3335 process . exit ( 0 ) ;
3436}
3537
@@ -46,24 +48,32 @@ function symlinkNgCLItoNxCLI() {
4648 * This is the most reliable way to create symlink-like behavior on Windows.
4749 * Such that it works in all shells and works with npx.
4850 */
49- [ '' , '.cmd' , '.ps1' ] . forEach ( ext => {
50- if ( fs . existsSync ( nxPath + ext ) ) fs . writeFileSync ( ngPath + ext , fs . readFileSync ( nxPath + ext ) ) ;
51+ [ '' , '.cmd' , '.ps1' ] . forEach ( ( ext ) => {
52+ if ( fs . existsSync ( nxPath + ext ) )
53+ fs . writeFileSync ( ngPath + ext , fs . readFileSync ( nxPath + ext ) ) ;
5154 } ) ;
5255 } else {
5356 // If unix-based, symlink
5457 cp . execSync ( `ln -sf ./nx ${ ngPath } ` ) ;
5558 }
56- }
57- catch ( e ) {
58- output . error ( { title : 'Unable to create a symlink from the Angular CLI to the Nx CLI:' + e . message } ) ;
59+ } catch ( e ) {
60+ output . error ( {
61+ title :
62+ 'Unable to create a symlink from the Angular CLI to the Nx CLI:' +
63+ e . message ,
64+ } ) ;
5965 throw e ;
6066 }
6167}
6268
6369try {
6470 symlinkNgCLItoNxCLI ( ) ;
6571 require ( 'nx/src/adapter/decorate-cli' ) . decorateCli ( ) ;
66- output . log ( { title : 'Angular CLI has been decorated to enable computation caching.' } ) ;
67- } catch ( e ) {
68- output . error ( { title : 'Decoration of the Angular CLI did not complete successfully' } ) ;
72+ output . log ( {
73+ title : 'Angular CLI has been decorated to enable computation caching.' ,
74+ } ) ;
75+ } catch ( e ) {
76+ output . error ( {
77+ title : 'Decoration of the Angular CLI did not complete successfully' ,
78+ } ) ;
6979}
0 commit comments