GithubHelp home page GithubHelp logo

eknowles / generator-angular-components Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dictanova/generator-angular-components

0.0 1.0 0.0 451 KB

Instant scaffolding of your Angular library

JavaScript 89.31% CSS 10.69%

generator-angular-components's Introduction

Angular Components generator

This generator helps you scaffloding a nice Angular components library. It is largely inspired from the awesome UI Bootstrap project.

Getting Started

To install generator-angular-components from npm, run:

$ npm install -g generator-angular-components

Scaffold the project

Finally, initiate the generator:

$ yo angular-components
     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

You're using the fantastic AngularComponents generator.
[?] What do you want to call your library? My Angular components library
[?] What prefix do you want for your library? (ui.mylib) 

Build the project :

grunt
....
cd dist
python -m SimpleHTTPServer 8004

If you look into the dist folder, you should see 5 files and one folder

assets/   //The assets for the documentation
index.html  //The documentation page
ui.mylib-0.0.0.js // Your library 
ui.mylib-0.0.0.min.js // Your library minified
ui.mylib-tpls-0.0.0.js // Your library withe the templates
ui.mylib-tpls-0.0.0.min.js // Your library with the templates, minified

Browse on http://localhost:8004/, yout should see something like this :

Create a component

It feels a little empty in here, let's create a new component !

yo angular-components:component "my super awesome component"

You called the component subgenerator with the argument my super awesome component.
   create src/my-super-awesome-component/test/my-super-awesome-component.spec.js
   create src/my-super-awesome-component/docs/demo.html
   create src/my-super-awesome-component/docs/demo.js
   create src/my-super-awesome-component/docs/readme.md
   create template/my-super-awesome-component/my-super-awesome-component.html
   create src/my-super-awesome-component/my-super-awesome-component.js

Build the project again :

grunt

You should now see this :

That's better! You can now implement your component by editing the files in src/my-super-awesome-component/.

Automatic changelog

Brought to you by grunt-conventional-changelog

To activate commit message policy :

grunt enforce

To generate changelog :

grunt changelog

Tests

To unit test the scaffolder, run :

npm test

License

MIT

generator-angular-components's People

Contributors

eknowles avatar

Watchers

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