45
45
46
46
Ƭ ** Cache** : { get: (key: string) => Promise<string\> ; set: (key: string, value: string) => Promise<void\> }
47
47
48
- * Defined in [ types.ts:15] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L15 ) *
48
+ * Defined in [ types.ts:15] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L15 ) *
49
49
50
50
#### Type declaration:
51
51
60
60
61
61
Ƭ ** CustomBlock** : { attrs: Record<string, string \| true\> ; content: string ; type: string }
62
62
63
- * Defined in [ types.ts:95] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L95 ) *
63
+ * Defined in [ types.ts:95] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L95 ) *
64
64
65
65
A custom block
66
66
78
78
79
79
Ƭ ** CustomBlockCallback** : (component: [ ModuleExport] ( README.md#moduleexport ) ) => void
80
80
81
- * Defined in [ types.ts:89] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L89 ) *
81
+ * Defined in [ types.ts:89] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L89 ) *
82
82
83
83
CustomBlockCallback function type
84
84
88
88
89
89
Ƭ ** File** : { content: string \| ArrayBuffer ; extname: string }
90
90
91
- * Defined in [ types.ts:66] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L66 ) *
91
+ * Defined in [ types.ts:66] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L66 ) *
92
92
93
93
Represents a file content and the extension name.
94
94
@@ -105,15 +105,15 @@ ___
105
105
106
106
Ƭ ** LangProcessor** : (source: string, preprocessOptions?: any) => Promise<string\> \| string
107
107
108
- * Defined in [ types.ts:368] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L368 ) *
108
+ * Defined in [ types.ts:368] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L368 ) *
109
109
110
110
___
111
111
112
112
### Module
113
113
114
114
Ƭ ** Module** : { exports: [ ModuleExport] ( README.md#moduleexport ) }
115
115
116
- * Defined in [ types.ts:115] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L115 ) *
116
+ * Defined in [ types.ts:115] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L115 ) *
117
117
118
118
This just represents a loaded js module
119
119
129
129
130
130
Ƭ ** ModuleExport** : {}
131
131
132
- * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L109 ) *
132
+ * Defined in [ types.ts:109] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L109 ) *
133
133
134
134
This just represents a loaded js module exports
135
135
139
139
140
140
Ƭ ** ModuleHandler** : (extname: string, source: string, path: string, options: [ Options] ( README.md#options ) ) => Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
141
141
142
- * Defined in [ types.ts:60] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L60 ) *
142
+ * Defined in [ types.ts:60] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L60 ) *
143
143
144
144
Used by the library when it does not know how to handle a given file type (eg. ` .json ` files).
145
145
see [[ moduleHandlers]]
166
166
167
167
Ƭ ** Options** : { additionalBabelPlugins?: any[ ] ; compiledCache?: [ Cache] ( README.md#cache ) ; delimiters?: [ string, string] ; handleModule?: [ ModuleHandler] ( README.md#modulehandler ) ; moduleCache?: Record<string, LoadingType<[ ModuleExport] ( README.md#moduleexport ) \> \| [ ModuleExport] ( README.md#moduleexport ) \> ; pathHandlers: [ PathHandlers] ( README.md#pathhandlers ) ; addStyle: (style: string, scopeId: string \| undefined) => void ; customBlockHandler?: (block: [ CustomBlock] ( README.md#customblock ) , filename: string, options: [ Options] ( README.md#options ) ) => Promise<[ CustomBlockCallback] ( README.md#customblockcallback ) \| undefined\> ; getFile: (path: string) => Promise<[ File] ( README.md#file ) \> ; getResource: (pathCx: [ PathContext] ( README.md#pathcontext ) , options: [ Options] ( README.md#options ) ) => [ Resource] ( README.md#resource ) ; loadModule?: (path: string, options: [ Options] ( README.md#options ) ) => Promise<[ ModuleExport] ( README.md#moduleexport ) \| undefined\> ; log?: (type: string, ...data: any[ ] ) => void }
168
168
169
- * Defined in [ types.ts:126] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L126 ) *
169
+ * Defined in [ types.ts:126] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L126 ) *
170
170
171
171
#### Type declaration:
172
172
191
191
192
192
Ƭ ** PathContext** : { refPath: string ; relPath: string }
193
193
194
- * Defined in [ types.ts:25] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L25 ) *
194
+ * Defined in [ types.ts:25] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L25 ) *
195
195
196
196
A PathContext represents a path (relPath) relative to an abolute path (refPath)
197
197
Note that relPath is not necessary relative, but it is, relPath is relative to refPath.
209
209
210
210
Ƭ ** PathHandlers** : { extname: (filepath: string) => string ; resolve: (pathCx: [ PathContext] ( README.md#pathcontext ) ) => string }
211
211
212
- * Defined in [ types.ts:33] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L33 ) *
212
+ * Defined in [ types.ts:33] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L33 ) *
213
213
214
214
#### Type declaration:
215
215
224
224
225
225
Ƭ ** Resource** : { getContent: () => Promise<[ File] ( README.md#file ) \> ; id: string ; path: string }
226
226
227
- * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/types.ts#L77 ) *
227
+ * Defined in [ types.ts:77] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/types.ts#L77 ) *
228
228
229
229
Represents a resource.
230
230
@@ -242,9 +242,9 @@ Name | Type | Description |
242
242
243
243
• ` Const ` ** version** : string = process.env.VERSION
244
244
245
- * Defined in [ tools.ts:45] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/tools.ts#L45 ) *
245
+ * Defined in [ tools.ts:45] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/tools.ts#L45 ) *
246
246
247
- * Defined in [ index.ts:22] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/index.ts#L22 ) *
247
+ * Defined in [ index.ts:22] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/index.ts#L22 ) *
248
248
249
249
the version of the library (process.env.VERSION is set by webpack, at compile-time)
250
250
@@ -254,15 +254,15 @@ ___
254
254
255
255
• ` Const ` ** vueVersion** : string
256
256
257
- * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/createSFCModule.ts#L4 ) *
257
+ * Defined in [ createSFCModule.ts:4] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/createSFCModule.ts#L4 ) *
258
258
259
259
## Functions
260
260
261
261
### buildTemplateProcessor
262
262
263
263
▸ ** buildTemplateProcessor** (` processor ` : [ LangProcessor] ( README.md#langprocessor ) ): object
264
264
265
- * Defined in [ index.ts:144 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/index.ts#L144 ) *
265
+ * Defined in [ index.ts:147 ] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/index.ts#L147 ) *
266
266
267
267
Convert a function to template processor interface (consolidate)
268
268
284
284
285
285
▸ ** createSFCModule** (` source ` : string, ` filename ` : string, ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
286
286
287
- * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/createSFCModule.ts#L3 ) *
287
+ * Defined in [ createSFCModule.ts:3] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/createSFCModule.ts#L3 ) *
288
288
289
289
#### Parameters:
290
290
302
302
303
303
▸ ** defaultGetResource** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): [ Resource] ( README.md#resource )
304
304
305
- * Defined in [ index.ts:59] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/index.ts#L59 ) *
305
+ * Defined in [ index.ts:59] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/index.ts#L59 ) *
306
306
307
307
#### Parameters:
308
308
319
319
320
320
▸ ** defaultHandleModule** (` extname ` : string, ` source ` : string, ` path ` : string, ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \| null\>
321
321
322
- * Defined in [ tools.ts:360] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/tools.ts#L360 ) *
322
+ * Defined in [ tools.ts:360] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/tools.ts#L360 ) *
323
323
324
324
Default implementation of handleModule
325
325
338
338
339
339
### loadModule
340
340
341
- ▸ ** loadModule** (` path ` : string, ` options_ ?` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
341
+ ▸ ** loadModule** (` path ` : string, ` options ?` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
342
342
343
- * Defined in [ index.ts:112] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/index.ts#L112 ) *
343
+ * Defined in [ index.ts:112] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/index.ts#L112 ) *
344
344
345
345
This is the main function.
346
346
This function is intended to be used only to load the entry point of your application.
@@ -351,7 +351,7 @@ If for some reason you need to use it in your components, be sure to share at le
351
351
Name | Type | Default value | Description |
352
352
------ | ------ | ------ | ------ |
353
353
` path ` | string | - | The path of the ` .vue ` file. If path is not a path (eg. an string ID), your [ getFile] ( README.md#getfile ) function must return a [ File] ( README.md#file ) object. |
354
- ` options_ ` | [ Options] ( README.md#options ) | throwNotDefined('options') | - |
354
+ ` options ` | [ Options] ( README.md#options ) | throwNotDefined('options') | The options |
355
355
356
356
** Returns:** Promise<[ ModuleExport] ( README.md#moduleexport ) \>
357
357
394
394
395
395
▸ ** loadModuleInternal** (` pathCx ` : [ PathContext] ( README.md#pathcontext ) , ` options ` : [ Options] ( README.md#options ) ): Promise<[ ModuleExport] ( README.md#moduleexport ) \>
396
396
397
- * Defined in [ tools.ts:245] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/tools.ts#L245 ) *
397
+ * Defined in [ tools.ts:245] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/tools.ts#L245 ) *
398
398
399
399
#### Parameters:
400
400
@@ -411,7 +411,7 @@ Name | Type |
411
411
412
412
▪ ` Const ` ** defaultPathHandlers** : object
413
413
414
- * Defined in [ index.ts:44] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/be82822 /src/index.ts#L44 ) *
414
+ * Defined in [ index.ts:44] ( https://github.com/FranckFreiburger/vue3-sfc-loader/blob/2f56d33 /src/index.ts#L44 ) *
415
415
416
416
Default implementation of PathHandlers
417
417
0 commit comments