nsg
CLI tool for NativeScript + Angular
Last updated 3 years ago by wenris .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nsg 
SYNC missed versions from official npm registry.

nsg

A spork of Angular CLI for NativeScript & Angular projects, run nsg command as ng.

Installation

npm install -g nsg

Usage

Same as ng command in Angular CLI, except that nsg generates project/component/services/... comsumed by NativeScript.

Samples:

  1. Create new project: nsg new hello

  2. Generate a component named item: nsg generate component item

Most options in ng also available in nsg, like --inline-style, --flat ...

Use tns

After coding, run tns run android|ios to run.

Difference between nsg and ng

  • nsg uses nsg-cli.json as the configure filename
  • nsg makes absolute templateUrl and styleUrls as NativeScript requires it
  • nsg uses NativeScriptModule instead of RouterModule
  • nsg tries to make project structure looks like ng does as well as tns does
  • default selectors are prefixed with 'ns' instead of 'app'

Project structure made by nsg

+ hello/
    + .git/
    + app/
        + ns
            - app.module.ts
            - app.component.ts
            - app.component.html
            - app.component.css
        - app.css
        - main.ts
        - package.json
    - package.json
    - tsconfig.json
    - nsg-cli.json
    - README.md
    - .gitignore

nsg replaces src folder with app, as tns does. Since app is used, so this folder inside src is changed to ns.

Current Tags

  • 0.1.3                                ...           latest (3 years ago)

7 Versions

  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 9
Last Day 0
Last Week 1
Last Month 3
Dependencies (57)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |