Skip to content

Regaddi/generator-nitro

 
 

Repository files navigation

NPM version Build Status 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 macOS, Windows and Linux. Use this app for all your frontend work.

Usage

Before using, you need of course node installed.
Nitro and the Nitro generator are tested with the current "Active LTS" versions of node.js (release 6.x and 8.x).

Install yarn, yo and generator-nitro globally:

npm install -g yarn yo generator-nitro

Keep your global packages up to date:

npm outdated -g --depth=0

Do an update if necessary:

npm update -g

Project Generation

Create 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 --name= (default: current directory name)
  • Desired CSS preprocessor --pre= (less or scss; default: scss)
  • Desired view file extension --viewExt= (html, hbs or mustache; default: hbs)
  • Using client side templates --clientTpl (default: false)
  • Including example code --exampleCode (default: false)
  • Installing nitro-exporter --exporter (default: false)
  • Installing nitro-release --release (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 --viewExt=hbs --clientTpl

You may bypass the questions with --skip-questions. This will use the defaults for not specified options

yo nitro --name=myproject --clientTpl --exporter --skip-questions

Update a project

In your project, first update the generator to the newest version:

yarn add generator-nitro

If you then run yo nitro you will be asked to update the project. It is best to overwrite all local files and check the differences after.

Updating to a new major version needs some more work. Please check the release notes

Generators

Available generators:

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

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

Generated app

See how to use the generated app

Testing

Running yarn test will run the jasmine unit tests.

yarn test

Contribute

We are more than happy to accept external contributions to the project in the form of feedback, bug reports and pull requests :)

See the contributing docs

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 92.3%
  • CSS 2.6%
  • HTML 2.2%
  • TypeScript 2.0%
  • Shell 0.9%