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-browser-node-module with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Scaffold out a library for both the browser and node
The boilerplate repo is here.
This generator is inspired from sindresorhus/generator-nm.
The scaffolding is similar, it adds support for shipping your code to the browser using Rollup as a bundler.
npm install -g yo npm install -g generator-browser-node-module
First make sure you're in your project folder (
mkdir my-awesome-project && cd my-awesome-project/), then run
Browser Node Module.