Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

zhengxs2018/shared-node-browser-library-boilerplate

Repository files navigation

@zhengxs/npm-module-boilerplate

lang code style: prettier codecov License

Using rollup.js to build, a re-usable NPM module for run in nodejs and browser.

查看中文文档

关联文章

其他分支

  • branch:esm - 最初的 rollup + babel + es6 模板

Features

  • Use next javascript development.
  • Run in nodejs and browser.
  • Built-in bundle analyzer report, document generation, lint, unit testing && code coverage

Development Setup

You will need [Node.js][nodejs] version 10+.

After cloning the repo, run:

# Installation dependency
$ npm install

# build for production with minification
$ npm run build

# build for production and generate the bundle analyzer report
$ npm run analyse

# Generate document.
$ npm run ts-doc

There are some other scripts available in the scripts section of the package.json file.

Version Release

# Bump package version, include linting
$ npm version <newversion|major|minor|patch>

# Publish package, include build
$ npm publish

See npm for more help.

ChangeLog

See CHANGELOG.md

Contributing

See CONTRIBUTING.md