Skip to content

Commit bbfdf58

Browse files
authored
Merge pull request #28828 from storybookjs/norbert/decrease-bun-use
Build: Reduce `bun` usage
2 parents 1a6bb99 + 9605338 commit bbfdf58

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

scripts/prepare/addon-bundle.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
5050
} = (await fs.readJson(join(cwd, 'package.json'))) as PackageJsonWithBundlerConfig;
5151

5252
if (pre) {
53-
await exec(`bun ${pre}`, { cwd });
53+
await exec(`jiti ${pre}`, { cwd });
5454
}
5555

5656
const reset = hasFlag(flags, 'reset');
@@ -204,7 +204,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
204204
);
205205

206206
if (post) {
207-
await exec(`bun ${post}`, { cwd }, { debug: true });
207+
await exec(`jiti ${post}`, { cwd }, { debug: true });
208208
}
209209

210210
console.log('done');

scripts/prepare/bundle.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
4545
} = (await fs.readJson(join(cwd, 'package.json'))) as PackageJsonWithBundlerConfig;
4646

4747
if (pre) {
48-
await exec(`bun ${pre}`, { cwd });
48+
await exec(`jiti ${pre}`, { cwd });
4949
}
5050

5151
const reset = hasFlag(flags, 'reset');
@@ -160,7 +160,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
160160
);
161161

162162
if (post) {
163-
await exec(`bun ${post}`, { cwd }, { debug: true });
163+
await exec(`jiti ${post}`, { cwd }, { debug: true });
164164
}
165165

166166
if (process.env.CI !== 'true') {

scripts/prepare/tsc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
1212
} = await fs.readJson(join(cwd, 'package.json'));
1313

1414
if (pre) {
15-
await exec(`bun ${pre}`, { cwd });
15+
await exec(`jiti ${pre}`, { cwd });
1616
}
1717

1818
const reset = hasFlag(flags, 'reset');
@@ -66,7 +66,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
6666
}
6767

6868
if (post) {
69-
await exec(`bun ${post}`, { cwd }, { debug: true });
69+
await exec(`jiti ${post}`, { cwd }, { debug: true });
7070
}
7171

7272
if (!watch) {

0 commit comments

Comments
 (0)