Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import * as webpack from 'webpack'

declare namespace WebpackShellPlugin {
interface Options {
/** Scripts to execute on the initial build. Defaults to []. */
onBuildStart?: string[]

/**
* Scripts to execute after files are emitted at the end of the
* compilation. Defaults to [].
*/
onBuildEnd?: string[]

/** Scripts to execute after Webpack's process completes. Defaults to []. */
onBuildExit?: string[]

/**
* Switch for development environments. This causes scripts to execute once.
* Useful for running HMR on webpack-dev-server or webpack watch mode.
* Defaults to true.
*/
dev?: boolean

/**
* Switches script execution process from spawn to exec. If running into
* problems with spawn, turn this setting on. Defaults to false.
*/
safe?: boolean

/** DEPRECATED. Enable for verbose output. Defaults to false. */
verbose?: boolean
}

class Plugin extends webpack.Plugin {
constructor(options?: Options)
}
}

declare module 'webpack-shell-plugin' {
export = WebpackShellPlugin.Plugin
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.5.0",
"description": "Run shell commands before and after webpack builds",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"test": "webpack",
"test:dev": "webpack-dev-server --progress",
Expand Down