Giter VIP home page Giter VIP logo

npm-module-boilerplate's Introduction

npm-module-boilerplate

npm dependency Status devDependency Status Build Status Coveralls Code Climate npm npm node JavaScript Style Guide

A boilerplate for authoring npm modules, with tests and linting.

What's in the package?

Well, let me tell you!

  • ava and sinon for tests
  • nyc for code coverage
  • eslint-watch for linting
  • npm run scripts for the above, so you won't have to install any global packages while authoring your module (I hate global modules, grr)
  • .travis.yml for CI

npm run scripts

  • npm run test: Runs tests once
  • npm run test:watch: Runs tests in watch-mode
  • npm run lint: Lints the code once
  • npm run lint:watch: Lints the code in watch-mode
  • npm run cover: Runs code coverage using nyc (istanbul)
  • npm run coveralls: Used by coveralls
  • npm run do-publish: Used when publishing the package.

Getting started

  1. Clone this repo, or download it as a zip
    • If you decide to clone, remove the .git folder so you don't get unnecessary git history.
  2. Find and replace all occurences of npm-module-boilerplate and replace it with your module name - filenames, too. You might also want to replace jeffijoe with your own Github username... Probably the LICENSE.md as well. ๐Ÿ˜„
  3. Edit package.json, LICENSE.md and README.md for your own needs.
  4. npm install and start coding! open 2 terminals, one for linting (npm run lint-watch) and one for testing (npm run test-watch) - at least that's what I do. ;)
  5. Write your code in lib/npm-module-boilerplate.js (this is the main file)
  6. Write your tests in test/lib/npm-module-boilerplate.spec.js (.. or, don't?)
  7. Publish!

Author

Jeff Hansen - @Jeffijoe

npm-module-boilerplate's People

Contributors

jeffijoe avatar dandv avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.