Skip to content

Commit

Permalink
Make npm rules generators
Browse files Browse the repository at this point in the history
Pass `generator: 1` for both `npm` rules we create in `configure.mjs` as
this will mean that we don't delete the `.package-lock.json` file when
running `ninja -t clean`, which would cause us to have to redownload all
packages.
  • Loading branch information
elliotgoodrich committed Jul 7, 2024
1 parent d0af42d commit b0a1605
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure/configure.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function makeNpmCiRule(ninja) {
const ci = ninja.rule("npmci", {
command: prefix + "npm ci --prefix $cwd --silent",
description: "npm ci ($cwd)",
generator: 1,
});
return (a) => {
const cwd = dirname(getInput(a.in));
Expand All @@ -74,6 +75,7 @@ function makeNpmCiWorkspaces(ninja) {
const ci = ninja.rule("npmciworkspaces", {
command: prefix + "npm ci --workspaces --silent",
description: "npm ci --workspaces",
generator: 1,
});
return (a) =>
ci({
Expand Down

0 comments on commit b0a1605

Please sign in to comment.