2.3.0 • Published 4 years ago

@snowpack/plugin-run-script v2.3.0

Weekly downloads
6,659
License
MIT
Repository
github
Last release
4 years ago

@snowpack/plugin-run-script

Run any CLI command as a part of Snowpack’s dev server and production build. Useful for languages not supported by Snowpack plugins. This replaces the old run:* scripts in your Snowpack config.

Usage:

npm i @snowpack/plugin-run-script

Then add the plugin to your Snowpack config:

// snowpack.config.js

module.exports = {
  plugins: [
    [
      '@snowpack/plugin-run-script',
      {
        cmd: 'sass src/css:public/css --no-source-map', // production build command
        watch: 'sass --watch src/css:public/css --no-source-map', // (optional) dev server command
      },
    ],
  ],
};

Supply any CLI command in cmd. Note that this is the same as running the command yourself in your project root folder (i.e. you can reference any global packages as well as npm script).

Plugin Options

NameTypeDescription
cmdstringThe CLI command to run. Note that this will run before Snowpack builds.
namestring(optional) Set name of console output, default is program name.
watchstring(optional) A watch command to run during the dev server.
output"stream" or "dashboard"(optional) Set how the output should be recorded during dev.
2.3.0

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.7

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago