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

vulgar-cli

v0.6.0

Published

vulgar-cli is a simple command line-interface for generating and managing cutting-edge MEAN stack applications

Downloads

36

Readme

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

V#!g@r Command Line Join Slack

Currently in active development

Source for npm package vulgar. vulgar-cli is a core package of the vulgar.io project and is used primarily to deploy and manage full-stack web applications developed using MEAN technologies.

The cli currently provides the functionality to deploy a fresh copy of a MEAN application as well as assist you in creating the initial admin account. Automated dependency installation is also an option.

Various scaffolds are able to be generated through simple interaction with the cli. This serves as an easy starting point to begin coding anything across the stack. Don't waste your time coding boilerplate, start with functional code.

See https://github.com/datatypevoid/vulgar for more in-depth information about the v#!g@r flavor of MEAN stack.

Quick start

# install global prerequisites
$ npm install -g vulgar-cli generator-vulgar

# create a new mean app
$ vulgar init <nameOfApplication>

# add required global libraries
$ npm install -g typings webpack webpack-dev-server concurrently

# install the repo with npm
# (if you declined automated dependency installation in the wizard)
$ npm install

# build code
$ npm run build

# start up the stack

# this command runs two commands in parallel via `concurrently`:
# `npm run server` starts up `webpack-dev-server` allowing for
# hot module reloading
# `npm` run watch` uses `webpack` to watch the necessary files
# and build on file change
$ npm start

# in a separate terminal:
# start `Express` server
$ gulp serve

go to http://0.0.0.0:8080 or http://localhost:8080 in your browser

Basic Usage

Explore CLI functionality:

$ vulgar --help

Create a New MEAN app:

$ vulgar init <NameOfYourApp>

Angular 2 Scaffolds for the Front-End

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

# generate a new Angular 2 component
$ vulgar scaffold ngc

# generate a new Angular 2 directive
$ vulgar scaffold ngd

# look at this cool new Angular 2 pipe
$ vulgar scaffold ngp

# and this awesome Angular 2 service
$ vulgar scaffold ngs

You can find all possible scaffolds in the table below:

Scaffold | Usage --------- | -------------------------------- Component | $ vulgar scaffold ngc penguin Directive | $ vulgar scaffold ngd elephant Pipe | $ vulgar scaffold ngp lemur Service | $ vulgar scaffold ngs coyote

Generate a Routable Angular Component on the Front-end

You can generate a new Angular route via the following command (note the singular used in nyan):

$ vulgar scaffold ngr nyan

The cli will prompt the user to select the parent module, confirm the name for their newly minted routable Angular component, as well as define the Angular route path for the children components.

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

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

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

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

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

Scaffolds for the Back-End

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

# generate a new Mongoose model
$ vulgar scaffold m leopard
# generate a new Express route
$ vulgar scaffold r leopard

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 leopardRoutes from './routes/_leopard.router.js';

// . . .

// #### RESTful API Routes

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

You can find all possible scaffolds in the table below:

Scaffold | Usage --------- | -------------------------- Model | $ vulgar scaffold m leopard Route | $ vulgar scaffold r leopard

Other Commands

Install Dependencies:

$ cd <NameOfYourApp> && npm install

Build Code

$ npm run build

Start Server

$ gulp serve

Watch & Bundle Front-End With Webpack

$ npm run watch

Hot Module Reloading for Front-End Via Webpack

$ npm run server:dev:hmr

Contributing

Contributions are welcome but they myst clearly demonstrate a new concept in accordance with the Angular 2 Style Guide. Come join the discussion on Slack and help guide development.

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