Skip to content

Commit 930f26b

Browse files
refactor: change order
1 parent e79e05f commit 930f26b

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/index.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,6 @@ const raw = new Map<string, generatorObject>([
4747
],
4848
])
4949

50-
function agent(): PreprocessorGroup {
51-
let result: SetObject
52-
return {
53-
async markup({ content, filename }): Promise<Processed> {
54-
if (!filename) return { code: content }
55-
// console.log(filename, 'markup agent')
56-
let worker = new Magician(content, filename, configuration)
57-
worker = worker.prepare()
58-
worker = worker.setInject()
59-
worker = worker.extract()
60-
result = worker.getSets()
61-
raw.set(filename, {
62-
data: result,
63-
updatedAt: Date.now(),
64-
})
65-
66-
return {
67-
code: worker.getContent(),
68-
}
69-
},
70-
}
71-
}
72-
7350
async function generateCSS(
7451
key: string,
7552
attributes: Record<string, string | boolean>
@@ -123,6 +100,29 @@ async function generateCSS(
123100
return { defaultStyles, attributifyStyles, iconStyles }
124101
}
125102

103+
function agent(): PreprocessorGroup {
104+
let result: SetObject
105+
return {
106+
async markup({ content, filename }): Promise<Processed> {
107+
if (!filename) return { code: content }
108+
// console.log(filename, 'markup agent')
109+
let worker = new Magician(content, filename, configuration)
110+
worker = worker.prepare()
111+
worker = worker.setInject()
112+
worker = worker.extract()
113+
result = worker.getSets()
114+
raw.set(filename, {
115+
data: result,
116+
updatedAt: Date.now(),
117+
})
118+
119+
return {
120+
code: worker.getContent(),
121+
}
122+
},
123+
}
124+
}
125+
126126
function main(): PreprocessorGroup {
127127
if (configuration.experimental?.scan !== undefined) {
128128
const files = fg.sync(['src/**/*.svelte'], {})

0 commit comments

Comments
 (0)