Skip to content

Commit 9a124d5

Browse files
Rush tools updated for @Simplr publishing.
1 parent 8882de0 commit 9a124d5

File tree

3 files changed

+124
-69
lines changed

3 files changed

+124
-69
lines changed

common/config/rush/npm-shrinkwrap.json

Lines changed: 116 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"source-build": "npm run rush-tools -- run build -e @simplr/mvdir",
88
"test": "npm run rush-tools -- run test -e @simplr/mvdir",
99
"rush-tools": "ts-node ./tools/rush-tools.ts",
10-
"publish": "npm run rush-tools -- publish"
10+
"publish": "npm run rush-tools -- publish --access public"
1111
},
1212
"devDependencies": {
1313
"@microsoft/rush": "^3.0.9",

tools/rush-tools.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class RushTools {
2525
}
2626
}
2727

28-
this.runScript(`npm publish`, excludedPackages);
28+
const access = args.access != null ? `--access ${args.access}` : "";
29+
this.runScript(`npm publish ${access}`, excludedPackages);
2930
}
3031
}
3132

@@ -72,6 +73,7 @@ interface ArgumentsValues {
7273
script: string;
7374

7475
publish: boolean;
76+
access: string;
7577
}
7678

7779
const argv = yargs
@@ -96,6 +98,7 @@ const argv = yargs
9698
yargs => yargs,
9799
argvObj => {
98100
const args: string[] = argvObj._;
101+
99102
const filteredArgs = args.map(arg => {
100103
if (arg.length > 0 && arg[0] === "-") {
101104
return false;
@@ -114,7 +117,9 @@ const argv = yargs
114117
.command(
115118
"publish",
116119
"Publish projects",
117-
yargs => yargs,
120+
yargs => yargs.option("access", {
121+
type: "string"
122+
}),
118123
argvObj => {
119124
argvObj.publish = true;
120125
})

0 commit comments

Comments
 (0)