This is a Yeoman generator for apps that follow the Tokbox style guidelines and best practises.
This generator is built using Yeoman, you'll need to install that first.
npm install -g yo
Eventually I will push this to npm. But for you can install it using:
git clone https://github.com/luma/generator-tok.git
cd generator-tok
npm link
After that the yo tok
generator should be available.
mkdir appName
cd appName
yo tok appName
This will generate a private module by default. Use yo tok appName --private=false
to generate a public project.
By default it will also initialise a local Git repo for you. If you don't want one, or you wish to set it up yourself, then use the git
flag (e.g. yo tok appName --git=false
).
To see what tasks your new app has you can run gulp help
.
It will generate apps with the following:
- es6 support via Babel
- create a new (local) git repo in the cwd
- linting and code style checking via ESLint
- a task to generate TODO.md and todo.json files
- tasks via Gulp
- testing via Jasmine
- code coverage via Istanbul
- code doc generation via JSDoc
- Browser dependency management via Browserify
- Browser test running via Karma
- a default empty LICENSE file
- a default .editorconfig and .gitignore
- a mostly empty index.js that uses Bunyan for logging
- a package.json file containing all the common essentials
- it doesn't have strong guidelines for how you build your final package, except that you should use Gulp as your task system
- there should be a yeoman option for generating a library that targets browser, node, or both
- adding the ability to generate a browser app (Browserify and karma support)
- tests!