Skip to content

Commit

Permalink
tools: convert webpack-watch into a symlink of webpack-make
Browse files Browse the repository at this point in the history
When the webpack-make is invoked as webpack-watch, enable the
watch and no eslint options so it behaves as the old webpack-watch
wrapper.
  • Loading branch information
jelly authored and martinpitt committed Sep 3, 2021
1 parent 8bf8009 commit 92acdea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
7 changes: 5 additions & 2 deletions tools/webpack-make
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ const argparse = require("argparse");
const fs = require("fs");
const child_process = require("child_process");

// argv0 is node
const webpack_watch = process.argv[1].includes('webpack-watch');

const parser = argparse.ArgumentParser()
parser.add_argument('-c', '--config', { help: "Path to webpack.config.js", default: "webpack.config.js" })
parser.add_argument('-r', '--rsync', { help: "rsync webpack to ssh target after build", metavar: "HOST" })
parser.add_argument('-w', '--watch', { action: 'store_true', help: "Enable webpack watch mode" })
parser.add_argument('-e', '--no-eslint', { action: 'store_true', help: "Disable eslint linting" })
parser.add_argument('-w', '--watch', { action: 'store_true', help: "Enable webpack watch mode", default: webpack_watch })
parser.add_argument('-e', '--no-eslint', { action: 'store_true', help: "Disable eslint linting", default: webpack_watch })
parser.add_argument('prefix', { help: "The directory to build (eg. base1, shell, ...)", metavar: "DIRECTORY" })
args = parser.parse_args()

Expand Down
17 changes: 0 additions & 17 deletions tools/webpack-watch

This file was deleted.

1 change: 1 addition & 0 deletions tools/webpack-watch

0 comments on commit 92acdea

Please sign in to comment.