Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including generator-lit with all npm packages installed. Try it out:

var generatorLit = require("generator-lit")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

generator-lit v0.0.1

Save time building node modules

generator-lit NPM version Build Status XO code style

scaffold lit node modules


Write your modules with the newest features, yet support the oldest systems. Run yo lit and you'll be left with everything you need to ship your next big idea!


  • code with es2016+
  • transpile back for v0.10+ support
  • optional cli (separates the api and cli into one lerna project)
  • optional code coverage with nyc
  • optional coverage uploading with Coveralls



$ npm install --global yo generator-lit


With yo:

$ yo lit

There are multiple command-line options available:

$ yo lit --help

    yo lit [options]

    --help          # Print the generator's options and usage
    --skip-cache    # Do not remember prompt answers                       Default: false
    --skip-install  # Do not automatically install dependencies            Default: false
    --org           # Publish to a GitHub organization account
    --cli           # Add a CLI                                            Default: true
    --coverage      # Add code coverage with nyc                           Default: true
    --coveralls     # Upload coverage to (implies --coverage) Default: true

The --org option takes a string value (i.e. --org=avajs). All others are boolean flags and can be negated with the no prefix (i.e. --no-coveralls). You will be prompted for any options not passed on the command-line.


What does it mean to "code in es2016+"?

All lit scaffolded modules are stranspiled with babel's es2015 and stage-2 presets - which includes stage-3, and stage-4.

So you can finally use the newest features with no configuration:

const sum = (...numbers) => {
  return numbers.reduce((a, b) => {
    return a + b;

console.log(sum(1, 2, 3, 4, 5)); // 15

Your module's interaction with babel is very simple:


  "presets": [

Add to, remove, modify, or delete babel entirely. Either way it's the way of life until all of our everyday systems run the coolest new features. Read more about babel

Why are the api and cli two separate modules in one repo?

One word: modularity.

More good reasons:

  1. When user's want your api, they don't need to also download the cli
  2. Install time for them together is sometimes the exact same speed as just one
  3. Eases tracking down where bug's lie


MIT © Dawson Botsford

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free