@@ -47,29 +47,6 @@ const raw = new Map<string, generatorObject>([
47
47
] ,
48
48
] )
49
49
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
-
73
50
async function generateCSS (
74
51
key : string ,
75
52
attributes : Record < string , string | boolean >
@@ -123,6 +100,29 @@ async function generateCSS(
123
100
return { defaultStyles, attributifyStyles, iconStyles }
124
101
}
125
102
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
+
126
126
function main ( ) : PreprocessorGroup {
127
127
if ( configuration . experimental ?. scan !== undefined ) {
128
128
const files = fg . sync ( [ 'src/**/*.svelte' ] , { } )
0 commit comments