Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed May 18, 2024
1 parent 32913cf commit eb544d0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion storage/framework/core/actions/src/dev/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Action } from '@stacksjs/enums'
import { log } from '@stacksjs/logging'
import type { DevOptions } from '@stacksjs/types'
import { runAction } from '../helpers/utils'
import { runAction } from '../helpers'

export async function runDevServer(options: DevOptions) {
log.info('Starting your Frontend Engine...')
Expand Down
10 changes: 4 additions & 6 deletions storage/framework/core/actions/src/generate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { log } from '@stacksjs/logging'
import { frameworkPath, projectPath } from '@stacksjs/path'
import type { GeneratorOptions } from '@stacksjs/types'
import { runNpmScript } from '@stacksjs/utils'
import { runAction } from '../helpers/utils'
import { generateVsCodeCustomData as genVsCodeCustomData, runAction } from '../helpers'

// import { files } from '@stacksjs/storage'

Expand Down Expand Up @@ -49,17 +49,15 @@ export async function generateWebTypes(options?: GeneratorOptions) {
}

export async function generateVsCodeCustomData(options?: GeneratorOptions) {
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
cwd: frameworkPath(),
...options,
})
const result = await genVsCodeCustomData()

if (result.isErr()) {
log.error('There was an error generating the custom-elements.json file.', result.error)
process.exit()
}

await runAction(Action.LintFix, { verbose: true }) // the generated json file needs to be linted
await runAction(Action.LintFix, { verbose: true }) // because the generated json file needs to be linted

log.success('Successfully generated the custom-elements.json file')
}

Expand Down
5 changes: 5 additions & 0 deletions storage/framework/core/actions/src/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './component-meta'
export * from './lib-entries'
export * from './package-json'
export * from './utils'
export * from './vscode-custom-data'
2 changes: 1 addition & 1 deletion storage/framework/core/actions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from './action'
export * from './dev'
export * from './generate'
export * from './helpers/utils'
export * from './helpers'

export { commit as runCommit } from './commit'
export { add as runAdd } from './add'
Expand Down
2 changes: 1 addition & 1 deletion storage/framework/core/actions/src/upgrade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import process from 'node:process'
import { parseArgs } from '@stacksjs/cli'
import { Action } from '@stacksjs/enums'
import { ExitCode } from '@stacksjs/types'
import { runAction } from '../helpers/utils'
import { runAction } from '../helpers'

const options: any = parseArgs()

Expand Down
1 change: 0 additions & 1 deletion storage/framework/core/enums/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export enum NpmScript {
GenerateTypes = 'generate:types',
GenerateEntries = 'generate:entries',
GenerateWebTypes = 'generate:web-types',
GenerateVsCodeCustomData = 'generate:vscode-custom-data',
GenerateIdeHelpers = 'generate:ide-helpers',
GenerateComponentMeta = 'generate:component-meta',
Release = 'release',
Expand Down

0 comments on commit eb544d0

Please sign in to comment.