🚀 Launch Week Day 5:Introducing Immutable Scans.Learn More →
Socket
Book a DemoInstallSign in
Socket

snowpack-plugin-run

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snowpack-plugin-run

snowpack plugin that executes shell commands sequentially when the bundle is generated

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

npm size libera manifesto

snowpack-plugin-run

Snowpack plugin that executes shell commands sequentially when the bundle is generated.

Requirements

This plugin requires an LTS Node version (v8.0.0+) and Snowpack v2.0.0+.

Install

Using npm:

npm install --save-dev snowpack-plugin-run

Usage

Create a snowpack.config.js configuration file and execute a single shell command when the bundle is generated by setting the value of cmd to a single string:

const dsv = require('snowpack-plugin-run');

module.exports = {
  mount: {
    public: { url: '/', static: true },
    src: { url: '/dist' },
  },
  plugins: [
    [
      'snowpack-plugin-run',
      {
        cmd: 'echo "this is a single command" >> file.txt',
      },
    ],
  ],
};

Execute multiple shell commands sequential when the bundle is generated by setting the value of cmd to an array of strings:

const dsv = require('snowpack-plugin-run');

module.exports = {
  mount: { ... },
  plugins: [
    [
      'snowpack-plugin-run',
      {
        cmd: [
          'echo "this is a line"',
          'echo "this is the second line"'
        ],
      },
    ],
  ],
};

Meta

LICENSE (MIT)

Keywords

snowpack

FAQs

Package last updated on 23 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts