npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-amg

v0.1.6

Published

Yeoman generator for Require.js based Angular.js application

Downloads

1

Readme

generator-amg

logo

What is this?

Briefly, this is console tool "kinda rails scaffolding", which allows you to create and manage angularjs application with requirejs as top-level dependency management tool. Top-level means, that this tool use requirejs for managing dependecies between files but not angular module dependencies.

#####This generator is in ALPHA TEST! So possibly it has some bugs! Feel free to notify me about bugs which you've found and I'll fix them ASAP.

Generated application structure

.
├── builds
|   ├── debug                             
|   └── release
├── grunt-tasks-configuration             
|   ├── connect.json
|   ├── html2js.json
|   ├── watch.json
|   ├── copy.json
|   └── requirejs.json
├── node_modules
├── sources
|   ├── index.html
|   └── js
|       ├── controllers
|       ├── controllers-module.js
|       ├── directives
|       ├── directives-module.js
|       ├── factories
|       ├── factories-module.js
|       ├── filters
|       ├── filters-module.js
|       ├── services
|       ├── services-module.js
|       ├── libs
|       |   └── vendors
|       |       ├── angular-ui-router
|       |       ├── angular
|       |       └── requirejs
|       ├── config
|       |   ├── routing-cinfiguration.js
|       |   └── messaging-bus-configuration.js
|       ├── utilities
|       |   ├── module-factory.js
|       |   ├── messaging-bus.js
|       |   └── sandbox.js
|       └── entry-point.js
├── tests    
|   ├── bootstrap-tests.js
|   └── unit-tests
|       ├── karma-config.js
|       └── messaging-bus-test.js
├── bower.json
├── Gruntfile.js
├── package.json
├── .bowerrc
├── .jshintrc
└── .gitignore

Why do you need it?

If you don't want to spend time on creating infrastructure of your front-end application but want to concentrate on development of domain features, this tool will do almost all routine work for you.

Features
  • generates good-structured application
  • provides configurations for grunt tasks to build and run generated application "from the box"
  • provides debug and release mode of building/running
  • provides generator to automaticaly add controller/directive/factory and so on to your app
  • automatically updates dependencies for new controllers/directives/factories etc.
  • provides messaging-bus to comunicate between different modules of your application
  • provides configuration for testing framework and working examples of unot-tests

How to use?

  1. Install yeoman $ npm install -g yo
  2. Install amg $ npm install -g generator-amg
  3. Create directory for your angular application mkdir someApp
  4. Create amg application cd someApp && yo amg
  5. Enter application name

Done!!! Now you can run your app using grunt run. If you want to add controller, factory, directive etc. to your app, use yo amg:add *<controller, directive, factory, ...>* *<name>*.

Example: yo amg:add controller home will generate new file sources/js/controllers/home-controller.js and add requirejs dependency for it to sources/js/controllers-module.js.

yo amg:remove controller home will remove home-controller.js and it's dependency on sources/js/controllers-module.js.

grunt run command allows you to run your application. If you want to run optimized version of your application(bundled and uglified), use grunt run --release.

To run unit-tests use karma start tests/unit-tests/karma-config.js

Application build process

Debug mode
  1. Copy all *.js files to builds/debug/web/js
  2. Use grunt-html2js to optimize views downloading process
  3. Run connect web server
  4. Run watch task, to rebuild application, if sources changed.
Release mode
  1. Perform 1 and 2 step from Debug mode building process
  2. Use grunt-contrib-requirejs to build requirejs application.
  3. Put built, bundled and minified application to builds/release/web/js
  4. Run connect web server
  5. Run watch task, to rebuild application, if sources changed

For now amg can generate:

  • controllers
  • services
  • factoriess
  • filters
  • directives

License

MIT