hook-shell-script-webpack-plugin v 0.1.1

用于在 webpack 编译器钩子被触发时运行任意的 shell 脚本。

安装

npm install --save-dev hook-shell-script-webpack-plugin
# 或
yarn add --dev hook-shell-script-webpack-plugin
1
2
3

使用

// webpack.config.js
const webpack = require('webpack');
const HookShellScriptPlugin = require('hook-shell-script-webpack-plugin');

module.exports = {
  // ...
  plugins: [
    new HookShellScriptPlugin({
      afterEmit: ['npx tsc --emitDeclarationOnly']
      // ...
    })
  ]
};
1
2
3
4
5
6
7
8
9
10
11
12
13