Javascript Starter Boilerplate - Webpack 4, Babel 7, UMD, Hot Reloading, and more
Library Starter Kit for your Javascript projects
This is a more robust library boilerplate. For a minimal alternative, check out js-library-boilerplate-basic.
npm start
)npm run demo
To build a ready-for-deployment demo (Example)
postinstall
message (Example)
git clone https://github.com/hodgef/js-library-boilerplate.git myLibrary
npm install
Before shipping, make sure to:
LICENSE
filepackage.json
information (These will be used to generate the headers for your built files)library: "MyLibrary"
with your library's export name in ./config/webpack.config.js
./bin/postinstall
(If you would like to display a message on package install)npm publish
import MyLibrary from 'my-library';
import 'my-library/build/index.css' // If you import a css file in your library
let libraryInstance = new MyLibrary();
...
<link href="build/index.css" rel="stylesheet">
<script src="build/index.js"></script>
let MyLibrary = window.MyLibrary.default;
let libraryInstance = new MyLibrary();
...
Made a library using this starter kit? Share it here by submitting a pull request!