Git Product home page Git Product logo

ng1-component-generator's Introduction

ng1-component-generator

Yet another component generator for AngularJS <= 1.4

Installation and usage

Installation:

npm install -g ng1-component-generator

Usage:

Usage: ng1-component-generator [options] <component>

Options:

    -V, --version         output the version number
    -p, --path [value]    Destination path [./src/app]
    -t, --tests           Add specs file?
    -m, --module [value]  Angular module name [app]
    -h, --help            output usage information

What does this do?

This module quickly scaffolds an AngularJS component with template, controller and tests.

Why?

I have to deal with some legacy code on daily basis, so I found useful to create a generator for my particular needs.

This lighten the weight of doing repetitve tasks and write boilerplate code.

Actually in AngularJS <= 1.4 you don't have components. This module ease the migration to new AngularJS version by using the same naming convention adopted in newer Angular.

Example

Launching

ng1-component-generator -p ./example/app -m app -t header

Will create the following

example
└── app
    └── header
        ├── header.component.js
        ├── header.controller.js
        ├── header.controller.specs.js
        └── header.template.html

the content of which is directly available from this repo.

Contributing

There are no tests and a lot of feature can be added. Here's a quick list:

  • service/factory/providers scaffolding;
  • module scaffolding;
  • directives scaffolding;

Any contribution will be apreciated.

ng1-component-generator's People

Contributors

shikaan 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.