Skip to content

Commit

Permalink
Fix scripts for npm by extracting run command out
Browse files Browse the repository at this point in the history
  • Loading branch information
gosar committed Feb 23, 2022
1 parent d02ff59 commit 563987f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static void writePackageJson(
template = template.replace("${package}", settings.getPackageName());
template = template.replace("${packageDescription}", settings.getPackageDescription());
template = template.replace("${packageVersion}", settings.getPackageVersion());
template = template.replace("${packageManager}", settings.getPackageManager().getCommand());
template = template.replace("${packageManager}", settings.getPackageManager().toString());
manifest.writeFile("package.json", template);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public SymbolProvider createSymbolProvider(Model model, TypeScriptSettings setti

public enum PackageManager {
YARN("yarn"),
NPM("npm run-script");
NPM("npm");

private final String command;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"prepack": "${packageManager} clean && ${packageManager} build"
"prepack": "${packageManager} run clean && ${packageManager} run build"
},
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
Expand Down

0 comments on commit 563987f

Please sign in to comment.