Skip to content

Commit 547bd15

Browse files
committed
chore: wip
1 parent e3e4299 commit 547bd15

File tree

12 files changed

+46
-96
lines changed

12 files changed

+46
-96
lines changed

.stacks/core/cli/build.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { runCommand } from '@stacksjs/cli'
1+
import { runCommand } from './src'
22

3-
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external @stacksjs/error-handling --external @stacksjs/logging --external @stacksjs/path --external @stacksjs/types --external @stacksjs/utils --external @antfu/install-pkg --external bun --external vite --target bun', {
3+
const result = await runCommand('bun --bun build ./src/index.ts --outdir ./cli/dist --external vite --external @antfu/install-pkg --external bun --external @stacksjs/types --external @stacksjs/logging --external prompts --external @stacksjs/utils --external @stacksjs/validation --external @stacksjs/error-handling --external ora --external kolorist --target bun', {
44
cwd: import.meta.dir,
55
})
66

77
// if (result.isErr())
8-
// log.error(result.error)
8+
// console.error(result.error)
99

1010
// else
11-
// log.success('Build complete')
11+
// console.write('Build complete!')

.stacks/core/cli/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export * from './actions'
22
export * from './command'
33
export * from './console'
44
export * from './helpers'
5-
export * from './log'
65
export * from './parse'
76
export * from './run'
87
export * from './spinner'

.stacks/core/cli/src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { CliOptions, StacksError, Subprocess, SyncSubprocess } from '@stack
33
import type { Result, ResultAsync } from '@stacksjs/error-handling'
44
import { errAsync, handleError, okAsync } from '@stacksjs/error-handling'
55
import { spawn, spawnSync } from './command'
6-
import { log } from './log'
6+
import { log } from './console'
77

88
/**
99
* Execute a command.

.stacks/core/storage/build.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { log, runCommand } from '@stacksjs/cli'
2+
3+
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external @stacksjs/arrays --external @stacksjs/path --external @stacksjs/config --external @stacksjs/strings --external fs-extra --external @stacksjs/error-handling --external @stacksjs/logging --target bun', {
4+
cwd: import.meta.dir,
5+
})
6+
7+
if (result.isErr())
8+
log.error(result.error)
9+
10+
else
11+
log.success('Build complete')

.stacks/core/storage/src/folders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { fs } from '@stacksjs/storage'
21
import { join } from '@stacksjs/path'
2+
import { fs } from './fs'
33

44
/**
55
* Determine whether a path is a folder.

.stacks/core/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"README.md"
3939
],
4040
"scripts": {
41-
"build": "echo 'wip'",
41+
"build": "bun build.ts",
4242
"typecheck": "bun --bun tsc --noEmit"
4343
},
4444
"peerDependencies": {

.stacks/core/validation/build.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { log, runCommand } from '@stacksjs/cli'
2+
import { handleError } from '@stacksjs/error-handling'
23

3-
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external @vinejs/vine --external @stacksjs/utils --external @stacksjs/vite --external @stacksjs/vite --external @stacksjs/cache --target bun', {
4+
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external @vinejs/vine --external @stacksjs/utils --external @stacksjs/vite --target bun', {
45
cwd: import.meta.dir,
56
})
67

78
if (result.isErr())
8-
log.error(result.error)
9+
handleError(result.error)
910

1011
else
1112
log.success('Build complete')

.stacks/core/validation/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"devDependencies": {
5353
"@stacksjs/development": "link:@stacksjs/development",
5454
"@stacksjs/path": "link:@stacksjs/path",
55-
"@stacksjs/vite": "link:@stacksjs/vite",
56-
"vue-starport": "latest"
55+
"@stacksjs/vite": "link:@stacksjs/vite"
5756
}
5857
}

.stacks/core/vite/build.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { log, runCommand } from '@stacksjs/cli'
2+
import { handleError } from '@stacksjs/error-handling'
3+
4+
const result = await runCommand('bun build ./src/index.ts --outdir dist --format esm --external @stacksjs/ --target bun', {
5+
cwd: import.meta.dir,
6+
})
7+
8+
if (result.isErr())
9+
handleError(result.error)
10+
11+
else
12+
log.success('Build complete')

.stacks/core/vite/src/vue-components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const vueComponentsConfig: ViteConfig = {
3030
},
3131

3232
optimizeDeps: {
33-
exclude: ['vue', 'local-pkg', 'vue-starport'],
33+
exclude: ['vue'],
3434
},
3535

3636
plugins: [

0 commit comments

Comments
 (0)