GithubHelp home page GithubHelp logo

jp-yeoman's Introduction

jp-yeoman

Yeoman generators for Angular 1 that follow the John Papa code style.

Installation

  1. Install Yeoman using npm (we assume you have pre-installed node.js).

    npm install -g yo

  2. Checkout this project using Git

  3. Run npm link from the project's folder, which makes the yeoman generators available on your command line anywhere. In the future you can pull in commits to this project and they'll be instantly available when you run the generator.

Usage

In any project, navigate to the folder where you'd like to add files. Then run one of these actions from the command line.

Yeoman generators:

  • yo jp:module <name>: generates an Angular module in its own file, per the John Papa code style
  • yo jp:controller <name>: generates an Angular controller per the John Papa code style
  • yo jp:directive <name>: generates an Angular directive which includes a HTML template in the John Papa code style
  • yo jp:service <name>: generates an Angular service/factory per the John Papa code style

You can specify the name of the thing to create as part of the command (e.g. yo jp:service myNewService), but by specifying it later, you'll get tips about naming conventions.

Generator development

Learn about Yeoman

Creating a generator

  1. If this is the first time you've done this, run npm install -g generator-generator
  2. From the root of this project, run yo generator:subgenerator <name>
  3. A sub-generator is created under generators/<name> which users can run using yo jp:<name>
  4. Add your generator to the list of generators above

Testing & Usage

To test out your new generator (or changes to an existing generator), run npm link from the root of this project if you haven't already. That command makes yo jp:<name> available.

jp-yeoman's People

Contributors

onstottj avatar

Watchers

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