GithubHelp home page GithubHelp logo

bdylanwalker / angular-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from angular/angular-cli

0.0 1.0 0.0 377 KB

License: Apache License 2.0

JavaScript 94.33% TypeScript 4.49% HTML 1.19%

angular-cli's Introduction

Angular-CLI

Prototype of a CLI for Angular 2 applications based on the ember-cli project.

Note

This projects is very much still a work in progress.

We still have a long way before getting out of our alpha stage. If you wish to collaborate while the project is still young, checkout our list issues.

Installation

npm install -g angular-cli

Usage

ng --help

Generating and serving an Angular2 project via a development server

ng new PROJECT_NAME
cd PROJECT_NAME
ng serve

Navigate to [http://localhost:4200/]. The app will automatically reload if you change any of the source files.

Generating other scaffolds

Add a new component with:

ng generate component my-new-component

Add a new service with:

ng generate service my-new-service

Add a new pipe with:

ng generate pipe my-new-pipe

Creating a build

ng build

The build artifacts will be stored in the dist/ directory.

Deploying the app via GitHub Pages

The CLI currently comes bundled with angular-cli-github-pages addon.

This means that you can deploy your apps quickly via:

git commit -a -m "final tweaks before deployment - what could go wrong?"
ng github-pages:deploy

Checkout angular-cli-github-pages addon docs for more info.

Known issues

This project is currently a prototype so there are many known issues. Just to mention a few:

  • All blueprints/scaffolds are in TypeScript only, in the future blueprints in all dialects officially supported by Angular will be available.
  • On Windows you need to run the build and serve commands with Admin permissions otherwise the performance really sucks.
  • Karma and Protractor integrations are missing.
  • The initial installation as well as ng new take too long because of lots of npm dependencies.
  • "ember" branding leaks through many error messages and help text.
  • Many existing ember addons are not compatible with Angular apps built via angular-cli.

Development Hints for hacking on angular-cli

Working with master

git clone https://github.com/angular/angular-cli.git
cd angular-cli
npm link

npm link is very similar to npm install -g except that instead of downloading the package from the repo, the just cloned angular-cli/ folder becomes the global package. Any changes to the files in the angular-cli/ folder will immediately affect the global angular-cli package, allowing you to quickly test any changes you make to the cli project.

Now you can use angular-cli via the command line:

ng new foo
cd foo
npm link angular-cli
ng server

npm link angular-cli is needed because by default the globally installed angular-cli just loads the local angular-cli from the project which was fetched remotely from npm. npm link angular-cli symlinks the global angular-cli package to the local angular-cli package. Now the angular-cli you cloned before is in three places: The folder you cloned it into, npm's folder where it stores global packages and the angular-cli project you just created.

Please read the official npm-link documentation and the npm-link cheatsheet for more information.

License

Apache v2

angular-cli's People

Contributors

cironunes avatar igorminar avatar rodyhaddad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.