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-init-enhanced

v1.1.2

Published

An easily composable Yeoman generator for quickly generating a license, README, and package.json that suits your needs

Downloads

3

Readme

generator-init-enhanced NPM version

An easily composable Yeoman generator for quickly generating a license, README, and package.json that suits your needs

Installation

First, install Yeoman and generator-init-enhanced using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-init-enhanced

Then generate your new project:

yo init-enhanced

Usage in Your Own Project

Simply answer all of the prompts after typing in the command above, and you're good to go! generator-init-enhanced will even remember what you answered last time! If you'd like to stick to the defaults and skip all prompts, simply generate with the --yes or --y flag:

yo init-enhanced --y

Note: I'd recommend not using the --yes/--y flag the first time you generate, so that you can enter all of your personal information once and have it filled out automatically for you in the future

Usage in Your Generator

There are two ways you can use this generator within yours. You can supply your own information, or you can allow it to do the work for you. Here's an example of supplying your own information:

this.composeWith(require.resolve('generator-init-enhanced'), {
  name: 'your-project-name', //default: this.appname
  description: 'Your brief project description', //default: An awesome project
  explanation: 'Your longer and more detailed project explanation', //default: [your-project-name] is an awesome project that does awesome things
  homepage: 'Url to the project homepage', //no default
  license: 'The license you would like for your project', //default: MIT
  author: 'The name of the user', //no default
  email: 'The email of the user', //no default
  url: 'A url to a website or profile of the user', //no default
  main: 'The entry point file', //default: index.js
  keywords: 'keyword1, keyword2, keyword3', //no default
  scripts: 'commands: command1 && command2, command: other-longer-command', //no default
  private: Boolean, //default: false
  username: 'The Github username of the user',
  prompt: 'name, description, explanation', //default: prompt everything
  prompt: 'xname, description, explanation' //a leading 'x' denotes that you would like to prompt everything except the list that follows
});

Note: generator-init-enhanced will remember users' past preferences and change defaults accordingly for fields like author and email that will likely remain the same across projects; consequently, even though it says above that there's no default for the author field, there will be a default if the user has used this generator before

Note: All fields are optional, yet recommended

You can also just let generator-init-enhanced do the work and prompt for you! It will remember user preferences. Here's an example:

this.composeWith(require.resolve('generator-init-enhanced'));

There's also an easy way to imitate npm/yarn init --y/yes, in which all defaults are used and prompting is skipped. Here's an example:

this.composeWith(require.resolve('generator-init-enhanced'), {
  yes: true
});

Licenses you can choose:

  • Apache 2.0
  • BSD 2-Clause (FreeBSD) License
  • BSD 3-Clause (NewBSD) License
  • GNU AGPL 3.0
  • GNU GPL 3.0
  • GNU LGPL 3.0
  • Internet Systems Consortium (ISC) License
  • MIT
  • Mozilla Public License 2.0
  • No License (Copyrighted)
  • Unlicense

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

© Brandon Suen