Git Product home page Git Product logo

generator-ngbp's Introduction

generator-ngbp

Yeoman Generator based on the popular ngBoilerplate AngularJS kickstarter. ngBoilerplate is a best-practice boilerplate for scalable Angular projects built on a highly modular, folder-by-feature structure. You work in vertical slices on a daily basis (view, controller, service, etc), so why not organize your projects to optimize your workflow, maximize discoverability, and get copy-paste module reuse for free?

Latest Updates

(12/29/14) Many best-practice improvements, including use of "Controller as model" syntax, cleaner controllers, plus separate *.module.js file for module declarations and grunt build support for those files. Coffeescript is close but broken with the *.module.coffee being included twice in resultant js file. I could use some help from anyone who works in coffeescript regularly, especially coffeescript grunt builds. As always, let me know if you find anything that needs fixing.

Quick Start

Install generator-ngbp from npm, run:

$ npm install -g generator-ngbp

Create a new directory for your project and cd into it:

$ mkdir my-new-project
$ cd my-new-project

Initiate the generator:

$ yo ngbp

Sub-Generators

There's only one subgenerator at the moment ngbp:module

To create a new module...

$ yo ngbp:module "moduleName"

You can specify the root folder of the module via prompt - default is "app".

You have to authorize the overwrite of app.js when the subgenerator adds a dependency for your new module (the default is Y, so you can just hit enter at the prompt). There's also still a bug with grunt watch that doesn't always see new files in new folders - gruntjs/grunt-contrib-watch#70. Stopping and re-running grunt watch will always work though.

ngBoilerplate Tips

When adding bower modules, always install with

$ bower install some-bower-module --save-dev

Then manually edit the vendor_files.js variable in Gruntfile.js to add the full path to the js files you need from the vendor folder. This grunt variable is what is used to create the script tags in the header of your index.html in the build folder (dev site). When you run "grunt compile", this same variable is used to add the vendor files to the single, minified js file in the bin folder (prod site).

More Info

To learn more about ngBoilerplate, click here

License

MIT

generator-ngbp's People

Contributors

thardy avatar ajspera avatar dinevillar avatar

Watchers

James Cloos 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.