https://github.com/pqml/brique
:construction::hammer: Hassle-free starter kit for building js modules
https://github.com/pqml/brique
Last synced: about 1 month ago
JSON representation
:construction::hammer: Hassle-free starter kit for building js modules
- Host: GitHub
- URL: https://github.com/pqml/brique
- Owner: pqml
- License: mit
- Created: 2016-12-27T20:29:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-18T17:46:59.000Z (over 7 years ago)
- Last Synced: 2025-02-17T15:52:22.939Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 146 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
brique
Hassle-free starter kit for building future-proof front-end js modules
## Features
- Bundling powered by [microbundle](https://github.com/developit/microbundle)
- Dev server and livereload with [light-server](https://github.com/txchen/light-server)
- Quickly deploy example of your module into a gh-pages branch with [ghp](https://github.com/brocessing/ghp)
- Support for ESNext & Async/await
- Minified outputs
- Multiple output formats (CJS, UMD, ES Modules)
- Add external dependencies inside the UMD build
- Minimal dev-dependencies footprint
- Pre-configured eslint for Standard JS
## Project Setup
##### Clone the starterkit and install its dev dependencies
```sh
$ git clone https://github.com/pqml/brique mymodule
$ cd mymodule
$ npm install
```##### :bulb: Before starting your project, it is recommanded to unboil it using [brocessing/`unboil`](https://github.com/brocessing/unboil) :
>`unboil` allows you to clean a boilerplate project (files like package.json, readme, git...) to quickly start your own project from it.```sh
$ npm i -g unboil # install unboil globally
$ cd mymodule
$ unboil # use it on your brand new brique installation
```##### Configure your module informations
- Edit package.json `main`, `module` and `unpkg` fields to customize your output filename
- Edit package.json `amdName` field to change your module global name for the UMD build
- Edit `example/index.html` to add proper title / description and change the bundle path to match your bundle name
## Module Installation & Usage
##### Installation from npm
```sh
# using npm
$ npm install --save mymodule# or using yarn
$ yarn add mymodule
```##### Usage with a module bundler
```js
// using ES6 module
import mymodule from 'mymodule'// using CommonJS module
var mymodule = require('mymodule')
```##### Usage from a browser
```html
```
## Development commands
- `npm install` - Install all npm dependencies
- `npm run start` - Start the dev server with livereload on the example folder
- `npm run build` - Bundle your library in CJS / UMD / ESM
- `npm run deploy` - Deploy your example folder on a gh-page branch
- `npm run test` - Lint your js inside the src folder
## License
MIT.