/rollup-library

Library template for rollup and typescript, powered by github actions

Primary LanguageJavaScriptMIT LicenseMIT

rollup-library

test build version

Library template for rollup and typescript, powered by github actions. Dependencies always up to date thanks to dependabot.

See rollup-application if you need an application template.

Usage

Click on Use this template then wait for the initialize workflow to complete. The package name and urls will be automatically replaced at initialization. You may want to change the author name in package.json and LICENSE.

Features

Bundling

  • Rollup, TypeScript, ESLint and Jest
  • ESM, CJS and UMD bundles
  • Path alias from tsconfig.json synced with rollup
  • Development server with demo in watch mode
  • Terser for browser and demo bundle

Continuous integration (Github Actions)

  • Build and test on pull requests and push to master
  • Build, test and publish to npm when a new version is pushed to master
    Requires NODE_TOKEN secret to be set as a NPM authentication token.
  • Build demo and deploy to Github Pages on push to master
    Requires PERSONAL_TOKEN secret to be set as a GitHub personal access token with full repo scope.

The publish and demo workflows are disabled by default, add the required secrets and remove the .sample suffix from the corresponding files to enable them.