Skip to content

Commit dd23f40

Browse files
committed
chore: wip
1 parent fa1ba83 commit dd23f40

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
{
22
"version": 1.1,
3-
"tags": [{
4-
"name": ["HelloWorld", "AppHelloWorld"],
5-
"description": "The Hello World custom element, built via this framework.",
6-
"attributes": [{
7-
"name": "greeting",
8-
"description": "The greeting."
9-
}]
10-
}, {
11-
"name": "Demo",
12-
"description": "A Demo components."
13-
}]
3+
"tags": [{"name":["HelloWorld","AppHelloWorld"],"description":"The Hello World custom element, built via this framework.","attributes":[{"name":"greeting","description":"The greeting."}]}]
144
}

storage/framework/core/src/actions/src/generate/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export async function generateWebTypes(options?: GeneratorOptions) {
7272
}
7373

7474
export async function generateVsCodeCustomData(options?: GeneratorOptions) {
75-
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, options)
75+
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
76+
cwd: frameworkPath(),
77+
...options,
78+
})
7679

7780
if (result.isErr()) {
7881
log.error('There was an error generating the custom-elements.json file.', result.error)
@@ -110,6 +113,7 @@ export async function generateComponentMeta(options?: GeneratorOptions) {
110113
export async function generateTypes(options?: GeneratorOptions) {
111114
const result = await runNpmScript(NpmScript.GenerateTypes, {
112115
cwd: frameworkPath(),
116+
...options,
113117
})
114118

115119
if (result.isErr()) {

storage/framework/core/src/actions/src/generate/vscode-custom-data.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ import { log } from '@stacksjs/logging'
99
import { hasComponents } from '@stacksjs/storage'
1010
import { generateVsCodeCustomData } from '../helpers/vscode-custom-data'
1111

12+
log.info('Generating VS Code custom data...')
13+
1214
if (hasComponents())
1315
await generateVsCodeCustomData()
1416

15-
else
16-
log.info('No components found. Skipping VS Code custom data generation.')
17+
else log.info('No components found. Skipping VS Code custom data generation.')
18+
19+
log.success('Generated VS Code custom data.')
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// generate types for ./resources/components & ./resources/function
2+
// currently triggered via buddy dev / vite
3+
import { log } from '@stacksjs/cli'
4+
5+
log.info('Generating web-types.json for IDEs...')
6+
log.info('This feature is not yet implemented.')

storage/framework/core/src/path/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function corePath(path?: string) {
132132
}
133133

134134
export function customElementsDataPath() {
135-
return corePath('custom-elements.json')
135+
return frameworkPath('core/custom-elements.json')
136136
}
137137

138138
export function databasePath(path?: string) {

0 commit comments

Comments
 (0)