Generates required files for a class for use in an Angular or React.
Last updated 2 years ago by chrisberry4545 .
ISC · Original npm · Tarball · package.json
$ cnpm install @chrisb-dev/fe-file-gen 
SYNC missed versions from official npm registry.

Frontend CLI file generator

Generates required files for a class for use in an Angular or React.


To run the app $ fe-file-gen {className} -t {componentType}

Replace {className} with the name of the file you want to create, using dashes between words e.g my-home-page.

Replace {componentType} with the angular type the component will be e.g:

  • component
  • service
  • react

Component and service are angular components.

Output format

Angular Component

Outputs the required files for the relevent class type in a folder with the given className.

E.g $ fe-file-gen my-home-page -t component

Will create a new folder my-home-page, which contains 5 files

  • my-home-page.component.scss
  • my-home-page.component.spec.ts
  • my-home-page.component.template.pug
  • my-home-page.component.ts
  • my-home-page.module.ts

These will be fully populated with the basics they'll need.

React component

The react component base has dependencies on the following elements:

  • react
  • redux
  • react-redux

fe-file-gen my-react-thing -t react

Creates the following files:

  • my-react-thing.component.scss
  • my-react-thing.dispatch.props.ts
  • my-react-thing.presentation.tsx
  • my-react-thing.scss
  • my-react-thing.state.props.ts

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |