Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Aug 13, 2024
1 parent fdf569b commit 0f6a2d3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions scripts/build-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ async function run() {
.parse(process.argv);

Object.keys(tasks).forEach((key) => {
const opts = program.opts();
// checks if a flag is passed e.g. yarn build --@storybook/addon-docs --watch
const containsFlag = program.rawArgs.includes(tasks[key].suffix);
tasks[key].value = containsFlag || program.all;
const containsFlag = program.args.includes(tasks[key].suffix);
tasks[key].value = containsFlag || opts.all;
});

let selection;
Expand Down
5 changes: 3 additions & 2 deletions scripts/check-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ async function run() {
.parse(process.argv);

Object.keys(tasks).forEach((key) => {
const opts = program.opts();
// checks if a flag is passed e.g. yarn check --@storybook/addon-docs --watch
const containsFlag = program.rawArgs.includes(tasks[key].suffix);
tasks[key].value = containsFlag || program.all;
const containsFlag = program.args.includes(tasks[key].suffix);
tasks[key].value = containsFlag || opts.all;
});

let selection;
Expand Down
6 changes: 4 additions & 2 deletions scripts/run-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const logger = console;

const root = resolvePath(__dirname, '..');

const opts = program.opts();

const startVerdaccio = async () => {
const ready = {
proxy: false,
Expand Down Expand Up @@ -193,13 +195,13 @@ const run = async () => {

logger.log(`📦 found ${packages.length} storybook packages at version ${chalk.blue(version)}`);

if (program.publish) {
if (opts.publish) {
await publish(packages, 'http://localhost:6002');
}

await execa('npx', ['rimraf', '.npmrc'], { cwd: root });

if (!program.open) {
if (!opts.open) {
verdaccioServer.close();
process.exit(0);
}
Expand Down

0 comments on commit 0f6a2d3

Please sign in to comment.