Giter VIP home page Giter VIP logo

webpack-library-boilerplate's Introduction

devDependency Status

Simple Webpack Library Boilerplate

This is a starter boilerplate for writing javascript libraries. It uses Webpack as a bundler and Jest as a testing tool.

Included Tools

Structure

  • ./src/js - Javasscript source folder
  • ./src/js/__test__ - Javasscript test folder
  • ./src/scss - CSS assosiated with the library (SCSS)
  • ./example - Example folder where you can test your library
  • ./dist - Compiled JS, CSS

Getting Started

In order to use this boilerplate you need to have npm or yarn installed.

Installing packages

yarn

yarn install

npm

npm install

Commands

  • yarn run dev

    Sets up a webpack dev server with hot module replacemnet. This is the index.html in ./example/index.html and can be accessed at http://localhost:8080

  • yarn run test

    Runs jest to test all the files located in ./src/js/__test_/ folder.

  • yarn run test:watch

    Runs jest watch and continously track the changes on test files

  • yarn run build

    Compiles all the source files and creates a minified version in ./dist folder

  • yarn run production

    Runs yarn run build and yarn run test

  • yarn run report-coverage

    Runs codecov. for more information on code coverage please visit codecov.io

Note

Please make sure to change the project name in package.json file. This also changes the name of the compiled js and css file.

webpack-library-boilerplate's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

chrisboakes

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.