Spawn bootstrap npm packages.
Spawns a bootstrap npm package.
NpmBoot is two things:
npmboot from the command line generates a bare-bones npm package in a given
directory with all the files necessary to execute the generated app right out of the
In order to use NpmBoot, you'll first need to install Node.js and npm.
Once you have Node and npm installed open the command line and run...
~$ npm install npmboot
You are now ready to start creating npm packages!
From the command line, these are your options:
In other words, here are a few ways you might call the app:
Remember, NpmBoot can only generate packages inside empty directories.
var npmboot = ;
Then call it with 3 arguments:
If you pass in something falsy for the
jsAPIfileName argument, it will default to your
appName. If you pass in something falsy for the
it will default to "default-app-name". If you pass in something falsy for the
outputdir argument, it will default to the current directory.
Other than that, you need a README file in order to describe your application, and a "package.json" file that npm will use to properly construct your application.
NpmBoot generates all of these files and puts enough information in them that you can actually execute your new package right out of the box. For convenience, it generates three other files: a blank ".npmignore" file, a blank ".gitignore" file, and a super simple bash argument parser to help you deal with flagged arguments that will come in from the command line.
Here is the full structure of files NpmBoot will generate:
After generating these files, open them up and alter them in whatever ways you'd like.
Whenever you're ready (and, again, you can do this immediately after generating),
access your package directory from the command line and run
~$ npm link. This will
allow you to use your application as if it were a finished product that had just
For more information on publishing a completed package, visit the npm docs.