@bagubagu/schematics
Bagubagu Schematics
Last updated a year ago by farhaan .
MIT · Original npm · Tarball · package.json
$ cnpm install @bagubagu/schematics 
SYNC missed versions from official npm registry.

Bagubagu Schematics

Develop

First thing first

npm install -g schematics-cli
git clone https://github.com/bagubagu/s.git
yarn install
yarn build

Modify table component

Modify src/table/files/*

to test:

# Test from an example angular project
cd example

# this will not really create the files
# because it's running in dry-run mode
schematics ..:table

# to see the changes
schematics ..:table --dry-run=false

Create new component

  1. Add your new component to src/collection.json
  2. mkdir src/newcomponent
  3. create your new component, use src/table as example

To test the component

cd example

# this will run in dry-run mode (not changing anything)
schematics ..:mycomponent

# set dry-run to false, to see changes
schematics ..:mycomponent --dry-run=false

Test from an existing angular project

# link our schematics to global
cd s
npm link .

# test from hijrah-admin
cd ../hijrah-admin
npm link @bagubagu/schematics
ng g @bagubagu/schematics:table

How to use

npm i -g @bagubagu/schematics

Create <anything>.json for @bagubagu/schematics

cd ./angular_project/src/app/
generate-json-schematics

This will generate <file_name>.json in ./angular_project/src/app

Create new table

 ng g @bagubagu/schematics:table <table_name> --project=<project_name>

Note: Before creating a new table please make sure that <table_name>.json's path is included (and/or) <table_name>.json does exists

Create new Service

 
 # this will run in dry-run mode (not changing anything)
 ng g @bagubagu/schematics:service <service_name> --project=<project_name>

Create new Pipe


  ng g @bagubagu/schematics:pipe <pipe_name> --project=<project_name>

Example

Create Table

  cd ./project/hehe/product/
  generate-json-schematics 

? What do you want to create?  (Use arrow keys)
  Form
❯ Table

  ng g @bagubagu/schematics:table product/product-list --dry-run=false

Create Form

  cd example/src/app/product/
  generate-json-schematics 

? What do you want to create?  (Use arrow keys)
❯ Form
  Table
  cd example/
  ng g @bagubagu/schematics:form product/product-add --dry-run=false

Service

   cd example/
   ng g @bagubagu/schematics:service product/product --project=example --dry-run=false

Pipe

  cd example/
  ng g @bagubagu/schematics:pipe product --project=example --dry-run=false
  

Current Tags

  • 0.3.30                                ...           latest (a year ago)

45 Versions

  • 0.3.30                                ...           a year ago
  • 0.3.26                                ...           a year ago
  • 0.3.25                                ...           a year ago
  • 0.3.24                                ...           a year ago
  • 0.3.23                                ...           a year ago
  • 0.3.22                                ...           a year ago
  • 0.3.21                                ...           a year ago
  • 0.3.20                                ...           a year ago
  • 0.3.19                                ...           a year ago
  • 0.3.18                                ...           a year ago
  • 0.3.17                                ...           a year ago
  • 0.3.16                                ...           a year ago
  • 0.3.15                                ...           a year ago
  • 0.3.14                                ...           a year ago
  • 0.3.13                                ...           a year ago
  • 0.3.12                                ...           a year ago
  • 0.3.11                                ...           a year ago
  • 0.3.10                                ...           a year ago
  • 0.3.9                                ...           a year ago
  • 0.3.8                                ...           a year ago
  • 0.3.7                                ...           a year ago
  • 0.3.6                                ...           a year ago
  • 0.3.5                                ...           a year ago
  • 0.3.4                                ...           a year ago
  • 0.3.3                                ...           a year ago
  • 0.3.2                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.14                                ...           2 years ago
  • 0.1.13                                ...           2 years ago
  • 0.1.12                                ...           2 years ago
  • 0.1.11                                ...           2 years ago
  • 0.1.10                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (7)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |