File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ fng help
4141
4242### Updating Fusing Angular CLI
4343
44+ ``` bash
45+ fng update
46+ ```
47+
48+ or
49+
4450``` bash
4551npm i -g fusing-angular-cli@latest
4652```
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import './build'
33import './serve'
44import './favicon'
55import './config'
6+ import './update'
67import { argv } from 'yargs'
78
89argv
Original file line number Diff line number Diff line change 1+ import { command } from 'yargs'
2+ import { logInfo , logError } from '../utilities/log'
3+ import { load , commands } from 'npm'
4+
5+ command (
6+ 'update' ,
7+ 'update the CLI to the latest version' ,
8+ args => {
9+ return args
10+ } ,
11+ args => {
12+ update ( )
13+ }
14+ )
15+
16+ function update ( ) {
17+ logInfo ( 'Updating the CLI' )
18+ load ( { global : true } , ( ) => {
19+ commands . install ( [ 'fusing-angular-cli@latest' ] , err => {
20+ err && logError ( err )
21+ } )
22+ } )
23+ }
You can’t perform that action at this time.
0 commit comments