49
49
50
50
Ƭ ** AbstractPath** : { toString: () => string }
51
51
52
- * Defined in [ types.ts:32] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L32 ) *
52
+ * Defined in [ types.ts:32] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L32 ) *
53
53
54
54
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.
55
55
63
63
64
64
### Cache
65
65
66
- Ƭ ** Cache** : { get: (key: string) => Promise<string\> ; set: (key: string, value: string) => Promise<void\> }
66
+ Ƭ ** Cache** : { get: (key: string) => Promise<string \| undefined \> ; set: (key: string, value: string) => Promise<void\> }
67
67
68
- * Defined in [ types.ts:20] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L20 ) *
68
+ * Defined in [ types.ts:20] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L20 ) *
69
69
70
70
#### Type declaration:
71
71
72
72
Name | Type |
73
73
------ | ------ |
74
- ` get ` | (key: string) => Promise<string\> |
74
+ ` get ` | (key: string) => Promise<string \| undefined \> |
75
75
` set ` | (key: string, value: string) => Promise<void\> |
76
76
77
77
___
80
80
81
81
Ƭ ** ContentData** : string \| ArrayBuffer
82
82
83
- * Defined in [ types.ts:71] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L71 ) *
83
+ * Defined in [ types.ts:71] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L71 ) *
84
84
85
85
___
86
86
87
87
### CustomBlock
88
88
89
89
Ƭ ** CustomBlock** : { attrs: Record<string, string \| true\> ; content: string ; type: string }
90
90
91
- * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L109 ) *
91
+ * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L109 ) *
92
92
93
93
A custom block
94
94
106
106
107
107
Ƭ ** CustomBlockCallback** : (component: [ ModuleExport] ( README.md#moduleexport ) ) => void
108
108
109
- * Defined in [ types.ts:103] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L103 ) *
109
+ * Defined in [ types.ts:103] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L103 ) *
110
110
111
111
CustomBlockCallback function type
112
112
116
116
117
117
Ƭ ** File** : { getContentData: (asBinary: Boolean) => Promise<[ ContentData] ( README.md#contentdata ) \> ; type: string }
118
118
119
- * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L77 ) *
119
+ * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L77 ) *
120
120
121
121
Represents a file content and the extension name.
122
122
@@ -133,15 +133,15 @@ ___
133
133
134
134
Ƭ ** LangProcessor** : (source: string, preprocessOptions?: any) => Promise<string\> \| string
135
135
136
- * Defined in [ types.ts:422] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L422 ) *
136
+ * Defined in [ types.ts:422] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L422 ) *
137
137
138
138
___
139
139
140
140
### Module
141
141
142
142
Ƭ ** Module** : { exports: [ ModuleExport] ( README.md#moduleexport ) }
143
143
144
- * Defined in [ types.ts:128] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L128 ) *
144
+ * Defined in [ types.ts:128] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L128 ) *
145
145
146
146
This just represents a loaded js module
147
147
@@ -157,15 +157,15 @@ ___
157
157
158
158
Ƭ ** ModuleCacheId** : string
159
159
160
- * Defined in [ types.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L26 ) *
160
+ * Defined in [ types.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L26 ) *
161
161
162
162
___
163
163
164
164
### ModuleExport
165
165
166
166
Ƭ ** ModuleExport** : {} \| null
167
167
168
- * Defined in [ types.ts:123] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L123 ) *
168
+ * Defined in [ types.ts:123] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L123 ) *
169
169
170
170
This just represents a loaded js module exports
171
171
175
175
176
176
Ƭ ** ModuleHandler** : (type: string, getContentData: File[ \" getContentData\" ] , path: [ AbstractPath] ( README.md#abstractpath ) , options: [ Options] ( README.md#options ) ) => Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
177
177
178
- * Defined in [ types.ts:68] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L68 ) *
178
+ * Defined in [ types.ts:68] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L68 ) *
179
179
180
180
Used by the library when it needs to handle a does not know how to handle a given file type (eg. ` .json ` files).
181
181
200
200
201
201
Ƭ **Options**: { additionalBabelParserPlugins?: babel\_ParserPlugin[] ; additionalBabelPlugins?: Record<string, any\> ; compiledCache?: [Cache](README.md#cache) ; delimiters?: [string, string] ; devMode?: boolean ; handleModule?: [ModuleHandler](README.md#modulehandler) ; isCustomElement: (tag: string) => boolean \| undefined ; moduleCache: Record<[ModuleCacheId](README.md#modulecacheid), LoadingType<[ModuleExport](README.md#moduleexport)\> \| [ModuleExport](README.md#moduleexport)\> ; pathResolve: [PathResolve](README.md#pathresolve) ; whitespace?: \"preserve\" \| \"condense\" ; 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 }
202
202
203
- * Defined in [ types.ts:139] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L139 ) *
203
+ * Defined in [ types.ts:139] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L139 ) *
204
204
205
205
#### Type declaration:
206
206
227
227
228
228
### PathContext
229
229
230
- Ƭ ** PathContext** : { refPath: [ AbstractPath] ( README.md#abstractpath ) ; relPath: [ AbstractPath] ( README.md#abstractpath ) }
230
+ Ƭ ** PathContext** : { refPath: [ AbstractPath] ( README.md#abstractpath ) \| undefined ; relPath: [ AbstractPath] ( README.md#abstractpath ) }
231
231
232
- * Defined in [ types.ts:41] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L41 ) *
232
+ * Defined in [ types.ts:41] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L41 ) *
233
233
234
234
A PathContext represents a path (relPath) relative to an abolute path (refPath)
235
235
Note that relPath is not necessary relative, but when it is, relPath is relative to refPath.
@@ -238,7 +238,7 @@ Note that relPath is not necessary relative, but when it is, relPath is relative
238
238
239
239
Name | Type | Description |
240
240
------ | ------ | ------ |
241
- ` refPath ` | [ AbstractPath] ( README.md#abstractpath ) | reference path |
241
+ ` refPath ` | [ AbstractPath] ( README.md#abstractpath ) \| undefined | reference path |
242
242
` relPath ` | [ AbstractPath] ( README.md#abstractpath ) | relative to @refPath |
243
243
244
244
___
247
247
248
248
Ƭ ** PathResolve** : (pathCx: [ PathContext] ( README.md#pathcontext ) ) => [ AbstractPath] ( README.md#abstractpath )
249
249
250
- * Defined in [ types.ts:50] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L50 ) *
250
+ * Defined in [ types.ts:50] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L50 ) *
251
251
252
252
relative to absolute module path resolution
253
253
257
257
258
258
Ƭ ** Resource** : { getContent: () => Promise<[ File] ( README.md#file ) \> ; id: [ ModuleCacheId] ( README.md#modulecacheid ) ; path: [ AbstractPath] ( README.md#abstractpath ) }
259
259
260
- * Defined in [ types.ts:88] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/types.ts#L88 ) *
260
+ * Defined in [ types.ts:88] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/types.ts#L88 ) *
261
261
262
262
Represents a resource.
263
263
@@ -275,9 +275,9 @@ Name | Type | Description |
275
275
276
276
• ` Const ` ** version** : string = process.env.VERSION as string
277
277
278
- * Defined in [ tools.ts:49] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/tools.ts#L49 ) *
278
+ * Defined in [ tools.ts:49] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/tools.ts#L49 ) *
279
279
280
- * Defined in [ index.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/index.ts#L26 ) *
280
+ * Defined in [ index.ts:26] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/index.ts#L26 ) *
281
281
282
282
the version of the library (process.env.VERSION is set by webpack, at compile-time)
283
283
@@ -287,15 +287,15 @@ ___
287
287
288
288
• ` Const ` ** vueVersion** : string
289
289
290
- * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/createSFCModule.ts#L4 ) *
290
+ * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/createSFCModule.ts#L4 ) *
291
291
292
292
## Functions
293
293
294
294
### buildTemplateProcessor
295
295
296
296
▸ ** buildTemplateProcessor** (` processor ` : [ LangProcessor] ( README.md#langprocessor ) ): object
297
297
298
- * Defined in [ index.ts:184 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/index.ts#L184 ) *
298
+ * Defined in [ index.ts:187 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/index.ts#L187 ) *
299
299
300
300
Convert a function to template processor interface (consolidate)
301
301
317
317
318
318
▸ ** createSFCModule** (` source ` : string, ` filename ` : [ AbstractPath] ( README.md#abstractpath ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
319
319
320
- * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/createSFCModule.ts#L3 ) *
320
+ * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/createSFCModule.ts#L3 ) *
321
321
322
322
#### Parameters:
323
323
335
335
336
336
▸ ** defaultGetResource** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): [ Resource] ( README.md#resource )
337
337
338
- * Defined in [ index.ts:76] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/index.ts#L76 ) *
338
+ * Defined in [ index.ts:76] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/index.ts#L76 ) *
339
339
340
340
Default getResource implementation
341
341
by default, getContent() use the file extension as file type.
355
355
356
356
▸ ** defaultHandleModule** (` type ` : string, ` getContentData ` : File[ \" getContentData\" ] , ` path ` : [ AbstractPath] ( README.md#abstractpath ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \| undefined\>
357
357
358
- * Defined in [ tools.ts:388 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/tools.ts#L388 ) *
358
+ * Defined in [ tools.ts:399 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/tools.ts#L399 ) *
359
359
360
360
Default implementation of handleModule
361
361
376
376
377
377
▸ ` Const ` ** defaultPathResolve** (` __namedParameters ` : { refPath: [ AbstractPath] ( README.md#abstractpath ) ; relPath: [ AbstractPath] ( README.md#abstractpath ) }): string \| [ AbstractPath] ( README.md#abstractpath )
378
378
379
- * Defined in [ index.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/index.ts#L53 ) *
379
+ * Defined in [ index.ts:53] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/index.ts#L53 ) *
380
380
381
381
Default resolve implementation
382
382
resolve() should handle 3 situations :
398
398
399
399
▸ ** loadModule** (` path ` : [ AbstractPath] ( README.md#abstractpath ) , ` options? ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
400
400
401
- * Defined in [ index.ts:157] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/index.ts#L157 ) *
401
+ * Defined in [ index.ts:157] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/index.ts#L157 ) *
402
402
403
403
This is the main function.
404
404
This function is intended to be used only to load the entry point of your application.
452
452
453
453
▸ ** loadModuleInternal** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
454
454
455
- * Defined in [ tools.ts:276] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/tools.ts#L276 ) *
455
+ * Defined in [ tools.ts:276] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/tools.ts#L276 ) *
456
456
457
457
#### Parameters:
458
458
@@ -469,6 +469,6 @@ Name | Type |
469
469
470
470
▪ ` Const ` ** targetBrowserBabelPlugins** : object
471
471
472
- * Defined in [ tools.ts:211] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/70777c8 /src/tools.ts#L211 ) *
472
+ * Defined in [ tools.ts:211] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/0811db4 /src/tools.ts#L211 ) *
473
473
474
474
#### Properties:
0 commit comments