Giter VIP home page Giter VIP logo

prod-module-boilerplate's Introduction

prod-module-boilerplate Circle CI

Travis-CI Gitter

An npm scripts boilerplate for modules intended for production.

Contents

Features

  • ES6 with Babel
  • Lint with ESLint
  • Tape tests with coverage report
  • Dependency security audits with nsp
  • Ensure dependencies are properly declared in package.json
  • Git precommit hook enforces quality checks on commit
  • Travis CI integration

Getting Started

Clone the repo

In a bash terminal:

git clone [email protected]:cloverfield-tools/prod-module-boilerplate.git <your-new-repo-name>
cd <your-repo-name>
rm -rf <.git> # strip the boilerplate .git config
git init # create your own .git config
git add .
git commit -m 'Initial commit'

Customize package.json

Open up package.json. At minimum, you'll need to customize the name, description, & version fields.

Configure your CI build

This package comes with a .travis.yml file. You'll need to replace it with your own build config. If you want to continue using TravisCI and you don't see any problems with the config, replacing .travis.yml is optional. You still need to activate Travis CI for your repository.

Customize the README.md file

Pop open README.md. Find this text:

[![Travis-CI](https://travis-ci.org/cloverfield-tools/prod-module-boilerplate.svg)](https://travis-ci.org/cloverfield-tools/prod-module-boilerplate)

And replace it with your info:

[![Travis-CI](https://travis-ci.org/<your-github-name>/<your-github-repo-name>.svg)](https://travis-ci.org/<your-github-name>/<your-github-repo-name>)

You'll probably also want to replace the content of "Getting Started" & "Features", and ensure that you're refering to the correct repository in the "Contributing" document.

Build your module

  1. For production
npm run build

It will run webpack once building full and minified versions of your library in ./build with sourcemaps.

  1. For development
npm start

This will run the webpack build in watch mode and will include ESLint checks on compile time.

webpack

Note minified version will not be built in dev mode.

Contributing

prod-module-boilerplate's People

Contributors

ericelliott avatar forresst avatar gavriguy avatar gblejman avatar nkbt avatar

Watchers

 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.