Skip to content

Commit 5962dfb

Browse files
committed
Adds --just-fix-deps options to topcoder-lib-setup script
1 parent 580fcca commit 5962dfb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/topcoder-lib-setup

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const OPTIONS = [{
1616
alias: 'h',
1717
description: 'Shows usage instructions',
1818
type: Boolean,
19+
}, {
20+
name: 'just-fix-deps',
21+
description: 'Skips installation of libraries, just fixes dependencies',
22+
type: Boolean,
1923
}, {
2024
name: 'libraries',
2125
defaultOption: true,
@@ -46,7 +50,7 @@ const HELP = [{
4650
* into NPM's install command.
4751
*/
4852
function generateTargetPackage(entry) {
49-
if (entry[1].match(/^(git\+)?https?:\/\//)) return entry[1];
53+
if (entry[1].match(/^(git\+)?(file|https)?:\/\//)) return entry[1];
5054
if (entry[1].match(/^[\^~]/)) return `${entry[0]}@${entry[1].slice(1)}`;
5155
return `${entry[0]}@${entry[1]}`;
5256
}
@@ -137,7 +141,7 @@ if (options.help) showHelp();
137141
else {
138142
const hostData = getHostPackageJson();
139143
options.libraries.forEach((library) => {
140-
install(library);
144+
if (!options['just-fix-deps']) install(library);
141145
const libData = getPackageJson(library);
142146
adoptDevDependencies(libData, hostData);
143147
updateProdDependencies(libData, hostData);

0 commit comments

Comments
 (0)