Skip to content

Commit 1756193

Browse files
committed
chore: wip
1 parent 696bc92 commit 1756193

File tree

10 files changed

+81
-101
lines changed

10 files changed

+81
-101
lines changed

.stacks/core/cli/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { runCommand } from './src/run'
22

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

.stacks/core/config/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
"@stacksjs/utils": "workspace:*",
4444
"@stacksjs/validation": "workspace:*"
4545
},
46-
"dependencies": {
47-
"c12": "^1.4.2"
48-
},
4946
"devDependencies": {
5047
"@stacksjs/alias": "workspace:*",
5148
"@stacksjs/development": "workspace:*",

.stacks/core/config/src/helpers.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
1-
import { loadConfig, watchConfig } from 'c12'
2-
import { frameworkPath } from '@stacksjs/path'
31
import type { StacksOptions as StacksConfig } from '@stacksjs/types'
42

5-
export async function loadStacksConfig(overrides?: Partial<StacksConfig>, cwd = frameworkPath()) {
6-
const { config } = await loadConfig<StacksConfig>({
7-
name: 'stacks',
8-
defaults: configDefaults,
9-
overrides: {
10-
...(overrides as StacksConfig),
11-
},
12-
cwd,
13-
})
14-
15-
return config!
16-
}
17-
183
export function defineStacksConfig(config: Partial<StacksConfig>) {
194
return config
205
}
21-
22-
export { loadConfig, watchConfig }

.stacks/core/utils/src/config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import type {
2424
UiOptions,
2525
} from '@stacksjs/types'
2626

27-
export { loadStacksConfig } from '@stacksjs/config'
28-
2927
export function defineApp(config: Partial<AppOptions>) {
3028
return config
3129
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
import { app } from '@stacksjs/config'
21
import type { ViteConfig } from '@stacksjs/types'
32
import { frameworkPath, libraryEntryPath, libsPath, projectPath, storagePath } from '@stacksjs/path'
43
import { alias } from '@stacksjs/alias'
54
import * as c from 'kolorist'
65
import type { ViteDevServer as DevServer } from 'vite'
6+
import app from '../../../../config/app'
77
import { autoImports, components, cssEngine, inspect, sslCertificate, uiEngine } from './stacks'
88
import type { ViteBuildOptions } from './'
99
import { defineConfig } from './'
1010

1111
// import { version } from '../package.json'
1212
const version = '0.0.0'
13+
console.log('version', version)
1314

1415
export const vueComponentsConfig: ViteConfig = {
1516
root: frameworkPath('libs/components/vue'),
@@ -117,6 +118,7 @@ export const vueComponentsConfig: ViteConfig = {
117118
}
118119
},
119120
},
121+
120122
],
121123

122124
build: vueComponentsBuildOptions(),

.stacks/scripts/build.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
// loop through all of the core packages and build them via `bun run build`
22

33
import { glob } from '@stacksjs/utils'
4-
import { ExitCode } from '@stacksjs/types'
4+
import { path as p } from '@stacksjs/path'
55
import { log } from '@stacksjs/logging'
6+
import { Arr } from '@stacksjs/arrays'
7+
import { ExitCode } from '@stacksjs/types'
68

79
// import { italic, command } from '@stacksjs/cli'
810

911
log.info('Building core packages')
1012

11-
const dirs = await glob(['../core/**/package.json'], {
12-
onlyDirectories: true,
13-
})
13+
const dirsToIgnore = ['src', 'dist', 'snippets', 'scripts', 'tests', 'node_modules', 'art']
14+
const dirs = (await glob([p.corePath('*'), p.corePath('*/*')], { onlyDirectories: true }))
15+
// filter out any directories that are not "core packages"
16+
.filter(dir => !Arr.contains(dir, dirsToIgnore))
1417

1518
if (dirs.length === 0) {
1619
log.info('No core packages found')

.stacks/types/auto-imports.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ declare global {
468468
const lint: typeof import('./src/index')['lint']
469469
const lintPath: typeof import('../core/path/src/index')['lintPath']
470470
const listen: typeof import('../core/events/src/index')['listen']
471-
const loadConfig: typeof import('./core/config/src/helpers')['loadConfig']
472471
const loadEnv: typeof import('../core/validation/src/types/env')['loadEnv']
473472
const loadStacksConfig: typeof import('../core/utils/src/config')['loadStacksConfig']
474473
const loadYaml: typeof import('../core/utils/src/helpers')['loadYaml']

bun.lockb

-24 Bytes
Binary file not shown.

config/email.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineEmailConfig } from '@stacksjs/utils'
22
import { env } from '@stacksjs/validation'
3-
import app from './app'
3+
import { app } from '@stacksjs/config'
44

55
/**
66
* **Email Configuration**

0 commit comments

Comments
 (0)