Angular Commands

December 31, 2021 · View on GitHub

Sl.No.CommandsDescription
01.npm install -g @angular/cli
02.ng new project-nameCreate an Angular project with Angular CLI
03.ng serve --open
04.ng testRunning unit tests
05.ng e2eRunning end-to-end tests with protractor framwork
06.ng generateGenerate Angular components
07.ng lintprints out linting errors
08.ng buildThe build artifacts will be stored in the dist/ directory.
09.ng build --prodThis will build the project in the dist directory
10.ng build --dev
11.ng get/ng setSet a value in the Angular CLI configuration
12.ng docOpens a browser window with the keyword as search in Angular documentation.
13.ng ejectejects your app and output the proper webpack configuration and scripts
14.ng xi18nExtracts i18n messages from the templates.
15.ng test --watch=false --code-coverageGenerate Code Coverage Reports
16.npm install firebase angularfire2 --save
17.npm install @angular/platform-browser-dynamicbootstrap module
18.npm install angular-in-memory-web-api --saveInstall In-memory-web-api
19.npm install @angular/elementsAngular elements
20.npm install -g nowOpensource server
21.npm install -g tsunREPL - TypeScript Upgraded Node
22.npm install moment --save-dev
23.npm run
24.npm run-script
25.ng add @angular/material
26.ng add @angular/cdk
27.ng add @angular/animations
28.npm install --save hammerjs
↥ back to top

Angular Generate Commands

Sl.No.Commands
01.ng new [ app-name ] --routing
02.ng generate component [ component-name ]
03.ng generate module [ module-name ]
04.ng generate class [ class-name ]
05.ng generate directive [ directive-name ]
06.ng generate interface [ interface-name ]
07.ng generate pipe [ pipe-name ]
08.ng generate serviceWorker [ serviceWorker-name ]
09.ng generate application [ application-name ]
10.ng generate enum [ enum-name ]
11.ng generate guard [ guard-name ]
12.ng generate service [ service-name ]
13.ng generate universal [ universal-name ]
14.ng generate appShell [ appShell-name ]
15.ng generate library [ library-name ]
16.ng generate component [ component-name ] --inline-template --inline-style --module app [ Generate initial test file ]
↥ back to top

WEBPACK Commands

Sl.No.CommandsDescription
01.npm init
02.npm install -g webpack
03.npm install webpack --save-dev
04.npm install jquery --save-dev
05.npm install
06.webpack main.js ./bundle.jsEntry_point compiled file_name
07.webpack
08.webpack -wwatch
09.npm install babel-loader babel-core --save-dev
10.npm install babel-preset-es2015 babel-preset-react --save-dev
11.npm install style-loader css-loader --save-devLoad css using webpack
12.npm install sass-loader node-sass --save-devrunning sass using webpack
13.npm install url-loader file-loader --save-devLoad images using webpack
14.npm install webpack-dev-server --save-devLoad project in server using webpack
↥ back to top

GIT Commands

Sl.No.CommandsDescription
01.git cloneClone a repository into a new directory
02.git config --bool core.bare falseTo change bare repository to normal repository
03.git resetReset current HEAD to the specified state
04.git branchList, create, or delete branches
05.git checkoutSwitch branches or restore working tree files
06.git stashSave local changes
07.git initCreate an empty Git repository or reinitialize an existing one
08.git addAdd file contents to the index
09.git mvMove or rename a file, a directory, or a symlink
10.git rmRemove files from the working tree and from the index
11.git bisectUse binary search to find the commit that introduced a bug
12.git grepPrint lines matching a pattern
13.git logShow commit logs
14.git showShow various types of objects
15.git statusShow the working tree status
16.git commitRecord changes to the repository
17.git diffShow changes between commits, commit and working tree, etc
18.git mergeJoin two or more development histories together
19.git rebaseReapply commits on top of another base tip
20.git tagCreate, list, delete or verify a tag object signed with GPG
21.git fetchDownload objects and refs from another repository
22.git pullFetch from and integrate with another repository or a local branch
23.git pushUpdate remote refs along with associated objects
↥ back to top

TypeScript Commands

Sl.No.CommandsDescription
01.npm install -g typescript
02.npm install -g typescript-compiler
03.tsc -vTypeScript Version
04.tsc ./app.tsCompile
05.tsc initInitializes a typescript project and creates a tsconfig.json file
06.tsc -wWatch input files
07.tsc -dGenerates corresponding '.d.ts' file
08.tsc --outConcatenate and emit output to single file
09.tsc --sourceMapGenerates corresponding '.map' file
10.npm install systemjs
↥ back to top