Vorpal & Webpack based CLI for Angular2 applications.
npm i ng2-cli -g
Start cli with the ng2
command.
Creates new project and steps into directory.
new my-awesome-project
name
- name of your project (required)path
- path where project will be createdskip-npm
- skips the npm dependencies installationskip-git
- skips git initialization
Generates Angular2 component.
Scaffold | Usage |
---|---|
Component | generate component my-new-component |
Directive | generate directive my-new-directive |
Pipe | generate pipe my-new-pipe |
Service | generate service my-new-service |
Class | generate class my-new-class |
Interface | generate interface my-new-interface |
All generated components are automatically imported into main AppModule and injected in declarations.
Serves your application.
server
Builds your project. You must be in project directory to build your project.
build
Clears the terminal window.
clear
Prints the info of the current project.
info
Searches for projects in current directory.
find
Prints current working directory.
pwd
Changes current working directory.
cd /Users/jan/Desktop/app