Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

daemon-command-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daemon-command-webpack-plugin

Run and restart npm commands after emit file webpack builds

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by900%
Maintainers
1
Weekly downloads
 
Created
Source

daemon-command-webpack-plugin

license Travis branch npm npm

Installing as a package

npm i daemon-command-webpack-plugin -S or npm install daemon-command-webpack-plugin --save

Usage

// package.json

{
  "name": "me-app",
  "version": "1.0.0",
  "scripts": {
      "start:dev:env": "node `pwd`/server/build/index.js",
      "start:dev": "NODE_ENV=development PORT=3000 node `pwd`/server/build/index.js",
    },
}
// webpack.config.js

const DaemonCommandPlugin = require('daemon-command-webpack-plugin');

module.exports = {
  // ... rest of config
  plugins: [
    // Command #1
    new DaemonCommandPlugin('start:dev:env', {
      env : {
        NODE_ENV : 'development',
        PORT : 3000
      }
    }),
    // Command #2
    new DaemonCommandPlugin('start:dev');
  ]
}

Arguments

  • command <String> The package.json scripts command to run
  • options <Object>
    • cwd <String> Current working directory of the child process
    • env <Object> Environment key-value pairs
    • uid <Number> Sets the user identity of the process
    • gid <Number> Sets the group identity of the process
    • debounce <Number> The number of milliseconds to debounce command start or restart

Use cwd to specify the working directory from which the process is spawned. If not given, the default is to inherit the current working directory. Use env to specify environment variables that will be visible to the new process, the default is process.env.

License

MIT

Keywords

FAQs

Package last updated on 21 Jul 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc