Skip to content

jantimon/generator-nitro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM version Build Status Dependency Status

Yeoman Nitro Generator

Yeoman generator for Nitro - lets you quickly set up a frontend project with sensible defaults and best practices.

Nitro is a Node.js application for simple and complex frontend development with a tiny footprint.
It provides a proven but flexible structure to develop your frontend code, even in a large team.
Keep track of your code with a modularized frontend. This app and the suggested atomic design and BEM concepts could help.
Nitro is simple, fast and flexible. It works on OSX, Windows and Linux. Use this app for all your frontend work.

Usage

Before using, you need of course node and npm installed.
Nitro and the Nitro generator are tested with the current versions of the node.js releases 0.12 and 4 (LTS). So everything between should work. It's not recommended to update node.js to release 5.

Install yo and other required tools globally:

npm install -g yo bower gulp jasmine karma-cli

If you want to use TypeScript, you need to install "tsd" (typescript definition repository) as well.

npm install -g tsd

Install generator-nitro:

npm install -g generator-nitro

Keep your global packages up to date:

npm outdated -g --depth=0

Make an update if necessary:

npm update -g

Project Generation

Make a new directory, and cd into it:

mkdir my-new-project && cd my-new-project

Run:

yo nitro

You will be guided through some configuration options:

  • Desired Name (default: current directory name)
  • Desired CSS preprocessor (less or scss; default: less)
  • Desired JavaScript compiler (JavaScript or TypeScript; default: JavaScript)
  • Desired view file extension (html, hbs or mustache; default: html)
  • Using client side templates (default: false)

The choosen options will be stored for the next project generation.

It's possible to pass in these options through the command line:

yo nitro --name=myproject --pre=less --js=JavaScript --viewExt=hbs --clientTpl

Update a project

If you run yo nitro from an existing project you may update your project to a newer version.

Generators

Available generators:

  • yo nitro (aka nitro:app)
  • yo nitro:component [name]

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

Generated app

See how tho use the generated app

Testing

Running npm test will run the jasmine unit tests.

npm test

Contribute

See the contributing docs
When submitting an issue, please follow the guidelines. Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.
When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.
When submitting a new feature, add tests that cover the feature.

Changelog

Recent changes can be viewed on Github on the Releases Page

License

MIT license

About

Your frontend? Fuel it with Nitro!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.1%
  • TypeScript 3.1%
  • CSS 3.0%
  • HTML 3.0%
  • Shell 0.8%