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 🙏

© 2026 – Pkg Stats / Ryan Hefner

lemon-package-generator

v1.0.2

Published

lemon's lemon-package-generator

Downloads

2

Readme

lemon-package-generator

optionated template

Why?

lemon-package-generator ensures all the rules given below are followed:

  • provide your users with a helpful .env.example

    • [ ] TODO: update README to include a default paragraph to describe what to do with .env.example
  • use dotenv for configuration, following the tenets of a twelve-factor app

    • only use dotenv in your application entry point, or library if applicable.
  • use container mode in travis and leverage folder caching.

  • use mocha for testing

  • use istanbul to generate coverage reports

  • publish coverage reports to codeclimate (requires configuring travis with the appropriate CODECLIMATE_REPO_TOKEN)

  • use standard and echint for linting files

  • enforce standard & echint by running on pretest

  • always generate code coverage reports by running istanbul on posttest

  • use commander to provide a CLI (Command Line Interface) when applicable

  • use debug-log to provide helpful debugging messages without the use of console.log

  • use EditorConfig files enforced by echint

  • keep your package lean, only include useful files for developers when running npm install (see package.json + .npmignore files)

  • use the most permissive open source license (currently ISC)

  • always expose your package's library modules (see folder tree below)

  • follow a preferred folder tree & npm's default expected file naming:

    /package-name/
    ├── bin
    │   └── package-name
    ├── docs
    │   ├── API.md
    │   └── INSTALL.md
    ├── .editorconfig
    ├── .env.example
    ├── .gitattributes
    ├── .gitignore
    ├── .jshintrc
    ├── lib
    │   └── index.js
    ├── LICENSE
    ├── .npmignore
    ├── package.json
    ├── README.md
    ├── server.js
    ├── src
    │   └── index.js
    ├── test
    │   ├── fixtures
    │   └── index.js
    └── .travis.yml
    • /docs/INSTALL.md: detailed instructions for anything beyond npm install
    • /docs/API.md: if your package exposes an language API, or as an application a web API, document here.
    • /lib: library files: all common business logic, use this folder as heavily as possible, e.g. Express routers
    • /src: application files: the application logic (if any), e.g. Express Server Setup
    • server.js: your application entry point (this is the default target of npm start), use for initializing and managing the application state
    • .jshintrc: this is only useful for running through an online quality check tool e.g. codeclimate which does not follow standard and has no configuration option for eslint yet.

Post Generating

  • remove any optional files and folders based on the type of project (e.g. ./bin, ./src, ./server.js)
  • unless directly affecting your logic, don't write custom logic for clustering, use pm2 instead
  • only use node v0.12.x and above (unless open-source, start with: node v0.10)
  • use npm scripts when possible to automate install and build steps:
    • e.g. "postinstall": "bower install"
    • e.g. "beforestart": "gulp build"

Work in progress...

This is a work in progress, and will likely be in this state forever! I will be updating this frequently as common practices change over time, or as I learn new trick.

please reach out to share some feedback & contribute!

Install

npm install --save lemon-package-generator

Usage

  Usage: lemon-package-generator [options] name path
  Options:
    -h, --help          output usage information
    -V, --version       output the version number
    -a, --author        Author Name
    -d, --description   description
    -e, --author-email  Author Email
    -g, --github        Github Username
    -i, --install       Install Dependencies
    -q, --quiet         hide npm install output
    -w, --website       Author Website

API

lemon-package-generator([options])

var generator = require('lemon-package-generator')
var options = {
    name: 'my-awesome-package',
    target: '~/Projects/my-awesome-package'
}
generator(options)
    .then(function (files) {
        console.log(files) /*-> [array of files created] */
    })
    .catch(function (err) {
        console.error(err)
    })

options

| option | description | default | | ------------- | ----------------------------------------------- | --------------------------------- | | author | author name | process.env.AUTHOR_NAME | | description | package description | process.env.PACKAGE_DESCRIPTION | | email | author email | process.env.AUTHOR_EMAIL | | github | github account | process.env.GITHUB_USERNAME | | install | run npm install and update dependencies | false | | name | package name | process.env.PACKAGE_NAME | | quiet | pipe npm output to process.stdout | false | | target | local path where the package files are created | process.cwd() | | website | author website | process.env.AUTHOR_WEBSITE |