Skip to content

Latest commit

 

History

History
118 lines (82 loc) · 2.68 KB

README.md

File metadata and controls

118 lines (82 loc) · 2.68 KB

generator-cfsg Build Status

The Cofounders frontend stack generator for Yeoman.

Usage

Install generator-cfsg:

npm install -g generator-cfsg

Make a new directory, and cd into it:

mkdir my-new-project && cd $_

Run yo cfsg, optionally passing an app name:

yo cfsg [app-name]

Generators

Available generators:

Note: Generators are to be run from the root directory of your app.

App

Sets up a new app based on the Cofounders frontend stack, generating all the boilerplate you need to get started.

Once done, run npm start to build and launch your brand new app.

See README.md to learn the Cofounders frontend stack.

Example:

yo cfsg

See: app/USAGE or run yo cfsg --help

Module

Adds a new module to the app by setting up a sensible directory structure.

Modules try to balance between an unwieldy number of tiny snippets and huge monolithic files. They work best on mid- to large-scale projects.

Example:

yo cfsg:module

See: module/USAGE or run yo cfsg:module --help

MVC

Adds a Backbone Model, View, or Controller to an app module. Injects code snippets and creates placeholders.

Example:

yo cfsg:mvc

See: mvc/USAGE or run yo cfsg:mvc --help

CDNJS

Adds external dependencies to the app for resources hosted on CDNJS.

Using external dependencies has several benefits:

  • Parallel client-side downloads
  • Shared caching across websites
  • Reduce hosting requirements (bandwidth) for the app
  • Faster builds by skipping external code

Example:

yo cfsg:cdnjs

See: cdnjs/USAGE or run yo cfsg:cdnjs --help

Legal

Changes the license under which the app is published.

Choose from a set of common open source licenses.

Example:

yo cfsg:legal

See: legal/USAGE or run yo cfsg:legal --help

EditorConfig

Utility to help keep the project coding style consistent.

  • Re-indents with hard tabs or soft tabs (spaces)
  • Changes indentation width: number of spaces
  • Fixes line separators (Unix/Windows)
  • Adds or trims the trailing new line

Warning: Measure twice cut once.

Example:

yo cfsg:editorconfig

See: editorconfig/USAGE or run yo cfsg:editorconfig --help

License

MIT License