1
1
import { parse } from 'svelte/compiler'
2
2
3
- export interface SetObject {
4
- inlineClasses : Set < string >
5
- inlineDirectives : Set < string >
6
- inlineExpressions : Set < string >
7
- inlineIcons : Set < string >
8
- inlineAttributify : Map < string , Set < string > >
9
- }
10
-
11
3
export class FileHandler {
12
4
private content : string
13
5
utilities : string [ ] = [ ]
@@ -20,15 +12,15 @@ export class FileHandler {
20
12
}
21
13
22
14
public clean ( ) : this {
23
- console . log ( 'CLEAN' )
15
+ console . log ( 'FILE-STEP: CLEAN' )
24
16
// find a way around this
25
17
this . content = this . content . replace ( / < ! - - [ \s \S ] * ?- - > / g, '' )
26
18
27
19
return this
28
20
}
29
21
30
22
public prepare ( ) : this {
31
- console . log ( 'PREPARE' )
23
+ console . log ( 'FILE-STEP: PREPARE' )
32
24
this . content = this . content . replace (
33
25
/ ( [ ! \w ] [ \w : _ / - ] * ?) : \( ( [ \w \s / - ] * ?) \) / gm,
34
26
( _ , groupOne : string , groupTwo : string ) =>
@@ -67,7 +59,7 @@ export class FileHandler {
67
59
}
68
60
69
61
public scan ( ) : this {
70
- console . log ( 'SCAN' )
62
+ console . log ( 'FILE-STEP: SCAN' )
71
63
72
64
const CLASSATTRIBUTE_MATCHES = [
73
65
...this . content . matchAll ( / c l a s s = ( [ ' " ` ] ) (?< utilities > [ ^ \1] + ?) \1/ gi) ,
@@ -174,7 +166,7 @@ export class FileHandler {
174
166
// }
175
167
176
168
public getStyles ( ) {
177
- console . log ( 'GET ' )
169
+ console . log ( 'FILE-STEP: STYLES ' )
178
170
179
171
const styles = {
180
172
data : {
0 commit comments