@vaporweb/component

Builds the project for production. CLI options will be forwarded to Rollup.

Usage no npm install needed!

<script type="module">
  import vaporwebComponent from 'https://cdn.skypack.dev/@vaporweb/component';
</script>

README

@vaporweb/component

Component Scripts

component build

Builds the project for production. CLI options will be forwarded to Rollup.

Rollup CLI options

Build files are output at the main and module paths set in the project's package.json file.

component develop

Builds the project in development mode and watches for changes. CLI options will be forwarded to Rollup.

Rollup CLI options

component lint

Runs the linter.

CLI options will be forwarded to eslint or tslint. For example, component lint --fix.

ESLint CLI options

TSLint CLI options

component test

Starts the test runner. CLI options will be forwarded to Jest. For example, component test --watch.

Jest CLI options

You can override jest configuration options by adding them to the package.json file.

Component Config

You can modify the config by placing a .component.js file in the root of your project. The config defaults are given in the example below.

  module.exports = {
    babel: true,
    eslint: true,
    tsc: false,
    tslint: false,
    rollup(config, { env }) {
      // here you can add additional plugins, e.g.
      // if (env === 'production') {
      //   config.plugins.push(terser())
      // }
      return config
    }
  }