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-vulgar

v0.8.3

Published

A MEAN stack development kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage), Express, MongoDB, Mongoose, Node, PassportJS, Socket.io, Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack

Downloads

20

Readme

Dependency Status Build Status GitHub release Issue Stats Issue Stats Stack Share

generator-vulgar Join Slack

This project is currently in alpha and is being developed for use under the hood of vulgar-cli, a tool for generating and managing cutting-edge MEAN stack applications

Scaffolds for the Back-End

You can use $ yo vulgar to generate various back-end components:

# generate a new Mongoose model
$ yo vulgar:model
# generate a new Express route
$ yo vulgar:route

Afterwards to use the new model and route together, open app/routes.js, import your new route and add it to the RESTful API section:

// Load our API routes for the `new` component
import newRoutes from './routes/_new.router.js';

// . . .

// #### RESTful API Routes

  // Pass in our Express app and Router
  newRoutes(app, router);

You can find all possible scaffolds in the table below:

Scaffold | Usage --------- | -------------------------- Model | $ yo vulgar:model Route | $ yo vulgar:route

Angular 2 Scaffolds for the Front-End

You can use $ yo vulgar to generate various Angular 2 components:

# generate a new Angular 2 component
$ yo vulgar:ng-component

# generate a new Angular 2 directive
$ yo vulgar:ng-directive

# look at this cool new Angular 2 pipe
$ yo vulgar:ng-pipe

# and this awesome Angular 2 service
$ yo vulgar:ng-service

You can find all possible scaffolds in the table below:

Scaffold | Usage --------- | -------------------------- Component | $ yo vulgar:ng-component Directive | $ yo vulgar:ng-directive Pipe | $ yo vulgar:ng-pipe Service | $ yo vulgar:ng-service

Generating a Routable Component on the Front-end

You can generate a new route by with the following command (note the singular used in hedgehog):

$ yo vulgar:ng-route hedgehog

This will create a folder with a routable component (hedgehog-root.component.ts) with two sub-routes. The file structure will be as follows:

...
|-- app
|   |-- hedgehog
|   |   |-- hedgehog-detail.component.html
|   |   |-- hedgehog-detail.component.sass
|   |   |-- hedgehog-detail.component.spec.ts
|   |   |-- hedgehog-detail.component.ts
|   |   |-- hedgehog-list.component.html
|   |   |-- hedgehog-list.component.sass
|   |   |-- hedgehog-list.component.spec.ts
|   |   |-- hedgehog-list.component.ts
|   |   |-- hedgehog-root.component.spec.ts
|   |   |-- hedgehog-root.component.ts
|   |   |-- hedgehog.service.spec.ts
|   |   |-- hedgehog.service.ts
|   |-- ...
|-- app.ts
...

Afterwards to use the new route open your main app component, import hedgehog-root.component.ts and add it in the route config:

@RouteConfig([
  {path:'/hedgehog/...', name: 'HedgehogRoot', component: HedgehogRoot}
])

Visiting http://localhost:8080/hedgehog will show the hedgehog list.

Supported Options

# set the name for your routable component, bypassing the prompt
$ yo vulgar:ng-route --name anteater

# it works similarly for
$ yo vulgar:ng-component --name rhino
$ yo vulgar:ng-directive --name ostrich
$ yo vulgar:ng-pipe --name zebra
$ yo vulgar:ng-service --name giraffe
# set the path for your routable component, bypassing the prompt
$ yo vulgar:ng-route --path anteaters
# set the module for your routable component, bypassing the prompt
# note that this directory should already exist in `src/`
$ yo vulgar:ng-route --module app

# . . .
$ yo vulgar:ng-component --module app
$ yo vulgar:ng-directive --module app
$ yo vulgar:ng-pipe --module app
$ yo vulgar:ng-service --module app
# set the destination for your routable component, bypassing the prompt
# this is from the `root` of your application
$ yo vulgar:ng-route --dest src/app/todo

# . . .
$ yo vulgar:ng-component --dest src/app/todo
$ yo vulgar:ng-directive --dest src/app/todo
$ yo vulgar:ng-pipe --dest src/app/todo
$ yo vulgar:ng-service --dest src/app/shared

Acknowledgements

[Angular](https://github.com/Angular for all of their magic as well as a great scaffolding starting point based on the output of the angular-cli tool

Support, Questions, or Feedback

Contact us anytime for anything about this repo, Angular 2, or MEAN stack development in general.


enjoy -- Da5id

Looking for corporate Angular/MEAN training, want to host us, or Angular/MEAN consulting? [email protected]

License

MIT