@byuweb/byu-web-component-build

2.1.6 • Public • Published

web-component-build

NPM version

Build toolchain for BYU Web Components.

This tool will generate module bundles for a set of web component javascript files using rollup, resolving any imported modules.

Installation

npm install --save-dev byu-web-component-build

Usage

npx byu-web-component-build

Command-line Arguments

Argument Short Option Long Option Description
Config File Location -c path to config file --config-file path to config file The path to the config file. Defaults to project root directory/byu-web-component-build.config.js
Watch -w --watch Set this flag to watch for changes to the source files. Defaults to false.

Configuration

By default, all .js files in the components directory will be bundled and output to the dist directory with -bundle added to the file name. These defaults can be changed by including a file named byu-web-component-build.config.js in your project root.

If you provide a componentLocation in the config file, another script will be generated which will load the web component polyfills before loading your components.

Example configuration file

module.exports = {
    sourceDir: 'src/web-components',
    destDir: 'www/components',
    componentLocation: 'https://cdn.example.com/components/latest'
}

Configuration File Options

Name required default description
sourceDir N 'components' Directory with files to bundle
destDir N 'dist' Directory in which to output files

Readme

Keywords

none

Package Sidebar

Install

npm i @byuweb/byu-web-component-build

Weekly Downloads

0

Version

2.1.6

License

Apache-2.0

Unpacked Size

22.2 kB

Total Files

8

Last publish

Collaborators

  • gi60s
  • sher1
  • arasmus8
  • kebowdog
  • snelg
  • stuft2