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

generator-nitro

v9.4.0

Published

Yeoman generator for the nitro frontend framework

Downloads

2,679

Readme

NPM version License Build 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 version and with the LTS maintenance versions.

Create a new project

Make sure you are in an existing git repo, or create one with git init.

This creates a new project in the current directory using npx (npm >= 5.2):

npx -p yo -p generator-nitro@latest -- yo nitro

then install with desired node version

npm install

Update a project

Updating a project to the newest nitro version is quite simple:

npm run nitro:update

... then

  • validate all local changes
  • run the 'clean' task to remove the package-lock and the 'node_modules' folder
  • run 'install'
npm run clean
npm install

Project Generation

On creating a new project, you will be guided through some configuration options:

  • Desired Name --name= (default: current directory name)
  • Desired template engine --templateEngine= (hbs or twig; default: hbs)
  • Desired js compiler --jsCompiler= (ts or js; default: ts)
  • Using theming feature --themes (default: false)
  • Using client side templates --clientTpl (default: false)
  • Including example code --exampleCode (default: false)
  • Installing nitro-exporter" --exporter (default: false)

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

npx -p yo -p generator-nitro@latest -- yo nitro --name=myproject --templateEngine=hbs --jsCompiler=ts --themes --clientTpl --exampleCode --exporter

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

npx -p yo -p generator-nitro@latest -- yo nitro --name=myproject --clientTpl --exporter --skip-questions

Project Update

If you start the generator in an existing project, 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 / generate or update a project)
  • yo nitro:pattern [name] (create or update a pattern)
  • yo nitro:server (create an executable light version of the project)

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

Generated app

Have a look at the sample project which contains the examples of a generated project and was statified with the default configuration of the "nitro-exporter".

See how to use the generated app

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