45
45
46
46
Ƭ ** AbstractPath** : { toString: () => string }
47
47
48
- * Defined in [ types.ts:32] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L32 ) *
48
+ * Defined in [ types.ts:32] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L32 ) *
49
49
50
50
An abstract way to specify a path. It could be a simple string or a object like an URL. An AbstractPath must always be convertible to a string.
51
51
61
61
62
62
Ƭ ** Cache** : { get: (key: string) => Promise<string\> ; set: (key: string, value: string) => Promise<void\> }
63
63
64
- * Defined in [ types.ts:20] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L20 ) *
64
+ * Defined in [ types.ts:20] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L20 ) *
65
65
66
66
#### Type declaration:
67
67
76
76
77
77
Ƭ ** ContentData** : string \| ArrayBuffer
78
78
79
- * Defined in [ types.ts:71] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L71 ) *
79
+ * Defined in [ types.ts:71] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L71 ) *
80
80
81
81
___
82
82
83
83
### CustomBlock
84
84
85
85
Ƭ ** CustomBlock** : { attrs: Record<string, string \| true\> ; content: string ; type: string }
86
86
87
- * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L109 ) *
87
+ * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L109 ) *
88
88
89
89
A custom block
90
90
102
102
103
103
Ƭ ** CustomBlockCallback** : (component: [ ModuleExport] ( README.md#moduleexport ) ) => void
104
104
105
- * Defined in [ types.ts:103] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L103 ) *
105
+ * Defined in [ types.ts:103] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L103 ) *
106
106
107
107
CustomBlockCallback function type
108
108
112
112
113
113
Ƭ ** File** : { getContentData: (asBinary: Boolean) => Promise<[ ContentData] ( README.md#contentdata ) \> ; type: string }
114
114
115
- * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L77 ) *
115
+ * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L77 ) *
116
116
117
117
Represents a file content and the extension name.
118
118
@@ -129,15 +129,15 @@ ___
129
129
130
130
Ƭ ** LangProcessor** : (source: string, preprocessOptions?: any) => Promise<string\> \| string
131
131
132
- * Defined in [ types.ts:399] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L399 ) *
132
+ * Defined in [ types.ts:399] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L399 ) *
133
133
134
134
___
135
135
136
136
### Module
137
137
138
138
Ƭ ** Module** : { exports: [ ModuleExport] ( README.md#moduleexport ) }
139
139
140
- * Defined in [ types.ts:129] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L129 ) *
140
+ * Defined in [ types.ts:129] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L129 ) *
141
141
142
142
This just represents a loaded js module
143
143
@@ -153,15 +153,15 @@ ___
153
153
154
154
Ƭ ** ModuleCacheId** : string
155
155
156
- * Defined in [ types.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L26 ) *
156
+ * Defined in [ types.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L26 ) *
157
157
158
158
___
159
159
160
160
### ModuleExport
161
161
162
162
Ƭ ** ModuleExport** : {}
163
163
164
- * Defined in [ types.ts:123] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L123 ) *
164
+ * Defined in [ types.ts:123] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L123 ) *
165
165
166
166
This just represents a loaded js module exports
167
167
171
171
172
172
Ƭ ** ModuleHandler** : (type: string, getContentData: File[ \" getContentData\" ] , path: [ AbstractPath] ( README.md#abstractpath ) , options: [ Options] ( README.md#options ) ) => Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
173
173
174
- * Defined in [ types.ts:68] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L68 ) *
174
+ * Defined in [ types.ts:68] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L68 ) *
175
175
176
176
Used by the library when it needs to handle a does not know how to handle a given file type (eg. ` .json ` files).
177
177
196
196
197
197
Ƭ **Options**: { additionalBabelParserPlugins?: babel\_ParserPlugin[] ; additionalBabelPlugins?: Record<string, any\> ; compiledCache?: [Cache](README.md#cache) ; delimiters?: [string, string] ; handleModule?: [ModuleHandler](README.md#modulehandler) ; moduleCache: Record<[ModuleCacheId](README.md#modulecacheid), LoadingType<[ModuleExport](README.md#moduleexport)\> \| [ModuleExport](README.md#moduleexport)\> ; pathResolve: [PathResolve](README.md#pathresolve) ; addStyle: (style: string, scopeId: string \| undefined) => void ; customBlockHandler?: (block: [CustomBlock](README.md#customblock), filename: [AbstractPath](README.md#abstractpath), options: [Options](README.md#options)) => Promise<[CustomBlockCallback](README.md#customblockcallback) \| undefined\> ; getFile: (path: [AbstractPath](README.md#abstractpath)) => Promise<[File](README.md#file) \| [ContentData](README.md#contentdata)\> ; getResource: (pathCx: [PathContext](README.md#pathcontext), options: [Options](README.md#options)) => [Resource](README.md#resource) ; loadModule?: (path: [AbstractPath](README.md#abstractpath), options: [Options](README.md#options)) => Promise<[ModuleExport](README.md#moduleexport) \| undefined\> ; log?: (type: string, ...data: any[]) => void }
198
198
199
- * Defined in [ types.ts:140] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L140 ) *
199
+ * Defined in [ types.ts:140] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L140 ) *
200
200
201
201
#### Type declaration:
202
202
222
222
223
223
Ƭ ** PathContext** : { refPath: [ AbstractPath] ( README.md#abstractpath ) ; relPath: [ AbstractPath] ( README.md#abstractpath ) }
224
224
225
- * Defined in [ types.ts:41] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L41 ) *
225
+ * Defined in [ types.ts:41] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L41 ) *
226
226
227
227
A PathContext represents a path (relPath) relative to an abolute path (refPath)
228
228
Note that relPath is not necessary relative, but it is, relPath is relative to refPath.
240
240
241
241
Ƭ ** PathResolve** : (pathCx: [ PathContext] ( README.md#pathcontext ) ) => [ AbstractPath] ( README.md#abstractpath )
242
242
243
- * Defined in [ types.ts:50] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L50 ) *
243
+ * Defined in [ types.ts:50] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L50 ) *
244
244
245
245
relative to absolute module path resolution
246
246
250
250
251
251
Ƭ ** Resource** : { getContent: () => Promise<[ File] ( README.md#file ) \> ; id: [ ModuleCacheId] ( README.md#modulecacheid ) ; path: [ AbstractPath] ( README.md#abstractpath ) }
252
252
253
- * Defined in [ types.ts:88] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/types.ts#L88 ) *
253
+ * Defined in [ types.ts:88] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/types.ts#L88 ) *
254
254
255
255
Represents a resource.
256
256
@@ -268,9 +268,9 @@ Name | Type | Description |
268
268
269
269
• ` Const ` ** version** : string = process.env.VERSION
270
270
271
- * Defined in [ tools.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/tools.ts#L53 ) *
271
+ * Defined in [ tools.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/tools.ts#L53 ) *
272
272
273
- * Defined in [ index.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/index.ts#L26 ) *
273
+ * Defined in [ index.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/index.ts#L26 ) *
274
274
275
275
the version of the library (process.env.VERSION is set by webpack, at compile-time)
276
276
@@ -280,15 +280,15 @@ ___
280
280
281
281
• ` Const ` ** vueVersion** : string
282
282
283
- * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/createSFCModule.ts#L4 ) *
283
+ * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/createSFCModule.ts#L4 ) *
284
284
285
285
## Functions
286
286
287
287
### buildTemplateProcessor
288
288
289
289
▸ ** buildTemplateProcessor** (` processor ` : [ LangProcessor] ( README.md#langprocessor ) ): object
290
290
291
- * Defined in [ index.ts:179] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/index.ts#L179 ) *
291
+ * Defined in [ index.ts:179] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/index.ts#L179 ) *
292
292
293
293
Convert a function to template processor interface (consolidate)
294
294
310
310
311
311
▸ ** createSFCModule** (` source ` : string, ` filename ` : [ AbstractPath] ( README.md#abstractpath ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
312
312
313
- * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/createSFCModule.ts#L3 ) *
313
+ * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/createSFCModule.ts#L3 ) *
314
314
315
315
#### Parameters:
316
316
328
328
329
329
▸ ** defaultGetResource** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): [ Resource] ( README.md#resource )
330
330
331
- * Defined in [ index.ts:76] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/index.ts#L76 ) *
331
+ * Defined in [ index.ts:76] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/index.ts#L76 ) *
332
332
333
333
Default getResource implementation
334
334
by default, getContent() use the file extension as file type.
348
348
349
349
▸ ** defaultHandleModule** (` type ` : string, ` getContentData ` : File[ \" getContentData\" ] , ` path ` : [ AbstractPath] ( README.md#abstractpath ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
350
350
351
- * Defined in [ tools.ts:372] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/tools.ts#L372 ) *
351
+ * Defined in [ tools.ts:372] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/tools.ts#L372 ) *
352
352
353
353
Default implementation of handleModule
354
354
369
369
370
370
▸ ` Const ` ** defaultPathResolve** (` __namedParameters ` : { refPath: [ AbstractPath] ( README.md#abstractpath ) ; relPath: [ AbstractPath] ( README.md#abstractpath ) }): string \| [ AbstractPath] ( README.md#abstractpath )
371
371
372
- * Defined in [ index.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/index.ts#L53 ) *
372
+ * Defined in [ index.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/index.ts#L53 ) *
373
373
374
374
Default resolve implementation
375
375
resolve() should handle 3 situations :
391
391
392
392
▸ ** loadModule** (` path ` : [ AbstractPath] ( README.md#abstractpath ) , ` options? ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
393
393
394
- * Defined in [ index.ts:152] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/index.ts#L152 ) *
394
+ * Defined in [ index.ts:152] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/index.ts#L152 ) *
395
395
396
396
This is the main function.
397
397
This function is intended to be used only to load the entry point of your application.
445
445
446
446
▸ ** loadModuleInternal** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
447
447
448
- * Defined in [ tools.ts:260] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9dfc5b1 /src/tools.ts#L260 ) *
448
+ * Defined in [ tools.ts:260] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/9111483 /src/tools.ts#L260 ) *
449
449
450
450
#### Parameters:
451
451
0 commit comments