snew-cli

0.0.1 • Public • Published

Snew Commandline Tool

Creating a new project

snew-cli --project src/client

Creates a project inside the given directory, creates or updates package.json and Gruntfile.js in the current working directory.

package.json:

{
  "devDependencies": {
    "grunt-snew": "*",
  },
  "snew": {
    "baseDirectory": "src/client",
    "distDirectory": "dist/client",
    "proxies": {
      "/rest": "http://localhost:8080"
  }
}

snew component creation

snew-cli component/todo

Creates an Controller, View and a Template in the given directory (relative to the baseDirectory given in the package.json

snew application watcher

snew-cli --watch

The process is a watcher on your baseDirectory and concats your controllers and views and precompiles your templates, and copies these to the given distDirectory

snew application server

snew-cli --serve

Uses the watchtask and serves an http-server, don't use this in production this is only for development purpose. The keys proxies are express.js routes which will directly transmitted to the corresponding value.

Readme

Keywords

none

Package Sidebar

Install

npm i snew-cli

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • plusgut