Skip to content

Commit 9b3a186

Browse files
chore(docs): v0.4.5 API docs & examples
1 parent 87b69d5 commit 9b3a186

File tree

9 files changed

+51
-51
lines changed

9 files changed

+51
-51
lines changed

docs/api/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
Ƭ **CustomBlockCallback**: (component: [ModuleExport](interfaces/moduleexport.md)) => void
4444

45-
*Defined in [types.ts:69](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L69)*
45+
*Defined in [types.ts:69](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L69)*
4646

4747
CustomBlockCallback function type
4848

@@ -52,17 +52,17 @@ ___
5252

5353
Ƭ **LoadModule**: (path: string, options: [Options](interfaces/options.md)) => Promise<[ModuleExport](interfaces/moduleexport.md)\>
5454

55-
*Defined in [types.ts:335](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L335)*
55+
*Defined in [types.ts:335](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L335)*
5656

5757
## Variables
5858

5959
### version
6060

6161
`Const` **version**: string = process.env.VERSION
6262

63-
*Defined in [tools.ts:39](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/tools.ts#L39)*
63+
*Defined in [tools.ts:39](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/tools.ts#L39)*
6464

65-
*Defined in [index.ts:11](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/index.ts#L11)*
65+
*Defined in [index.ts:11](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/index.ts#L11)*
6666

6767
the version of the library (process.env.VERSION is set by webpack, at compile-time)
6868

@@ -72,15 +72,15 @@ ___
7272

7373
`Const` **vueVersion**: string
7474

75-
*Defined in [createSFCModule.ts:4](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/createSFCModule.ts#L4)*
75+
*Defined in [createSFCModule.ts:4](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/createSFCModule.ts#L4)*
7676

7777
## Functions
7878

7979
### createSFCModule
8080

8181
**createSFCModule**(`source`: string, `filename`: string, `options`: [Options](interfaces/options.md), `loadModule`: [LoadModule](README.md#loadmodule)): Promise<[ModuleExport](interfaces/moduleexport.md)\>
8282

83-
*Defined in [createSFCModule.ts:3](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/createSFCModule.ts#L3)*
83+
*Defined in [createSFCModule.ts:3](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/createSFCModule.ts#L3)*
8484

8585
#### Parameters:
8686

@@ -99,7 +99,7 @@ ___
9999

100100
**loadModule**(`path`: string, `options_?`: [Options](interfaces/options.md)): Promise<[ModuleExport](interfaces/moduleexport.md)\>
101101

102-
*Defined in [index.ts:109](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/index.ts#L109)*
102+
*Defined in [index.ts:109](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/index.ts#L109)*
103103

104104
This is the main function.
105105
This function is intended to be used only to load the entry point of your application.
@@ -153,7 +153,7 @@ A Promise of the component
153153

154154
`Const` **defaultPathHandlers**: object
155155

156-
*Defined in [index.ts:56](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/index.ts#L56)*
156+
*Defined in [index.ts:56](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/index.ts#L56)*
157157

158158
Default implementation of PathHandlers
159159

docs/api/interfaces/cache.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
**get**(`key`: string): Promise<string\>
2323

24-
*Defined in [types.ts:19](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L19)*
24+
*Defined in [types.ts:19](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L19)*
2525

2626
#### Parameters:
2727

@@ -37,7 +37,7 @@ ___
3737

3838
**set**(`key`: string, `value`: string): Promise<void\>
3939

40-
*Defined in [types.ts:20](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L20)*
40+
*Defined in [types.ts:20](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L20)*
4141

4242
#### Parameters:
4343

docs/api/interfaces/customblock.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ A custom block
2424

2525
**attrs**: Record<string, string \| true\>
2626

27-
*Defined in [types.ts:78](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L78)*
27+
*Defined in [types.ts:78](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L78)*
2828

2929
___
3030

3131
### content
3232

3333
**content**: string
3434

35-
*Defined in [types.ts:77](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L77)*
35+
*Defined in [types.ts:77](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L77)*
3636

3737
___
3838

3939
### type
4040

4141
**type**: string
4242

43-
*Defined in [types.ts:76](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L76)*
43+
*Defined in [types.ts:76](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L76)*

docs/api/interfaces/file.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Represents a file content and the extension name.
2323

2424
**content**: string
2525

26-
*Defined in [types.ts:62](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L62)*
26+
*Defined in [types.ts:62](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L62)*
2727

2828
___
2929

3030
### extname
3131

3232
**extname**: string
3333

34-
*Defined in [types.ts:63](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L63)*
34+
*Defined in [types.ts:63](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L63)*

docs/api/interfaces/module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ This just represents a loaded js module
2222

2323
**exports**: [ModuleExport](moduleexport.md)
2424

25-
*Defined in [types.ts:96](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L96)*
25+
*Defined in [types.ts:96](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L96)*

docs/api/interfaces/modulehandler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ see [additionalModuleHandlers](options.md#additionalmodulehandlers)
1515

1616
▸ (`source`: string, `path`: string, `options`: [Options](options.md)): Promise<[ModuleExport](moduleexport.md)\>
1717

18-
*Defined in [types.ts:52](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L52)*
18+
*Defined in [types.ts:52](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L52)*
1919

2020
Used by the library when it does not know how to handle a given file type (eg. `.json` files).
2121
see [additionalModuleHandlers](options.md#additionalmodulehandlers)

docs/api/interfaces/options.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
`Optional` **additionalBabelPlugins**: any[]
3535

36-
*Defined in [types.ts:215](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L215)*
36+
*Defined in [types.ts:215](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L215)*
3737

3838
Additional babel plugins. [TBD]
3939

@@ -48,7 +48,7 @@ ___
4848

4949
`Optional` **additionalModuleHandlers**: Record<string, [ModuleHandler](modulehandler.md)\>
5050

51-
*Defined in [types.ts:222](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L222)*
51+
*Defined in [types.ts:222](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L222)*
5252

5353
Additional module type handlers. see [ModuleHandler](modulehandler.md)
5454

@@ -58,7 +58,7 @@ ___
5858

5959
`Optional` **compiledCache**: [Cache](cache.md)
6060

61-
*Defined in [types.ts:262](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L262)*
61+
*Defined in [types.ts:262](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L262)*
6262

6363
[get](cache.md#get)() and [set](cache.md#set)() functions of this object are called when the lib needs to save or load already compiled code. get and set functions must return a `Promise` (or can be `async`).
6464
Since compilation consume a lot of CPU, is is always a good idea to provide this object.
@@ -102,7 +102,7 @@ ___
102102

103103
`Optional` **delimiters**: [string, string]
104104

105-
*Defined in [types.ts:204](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L204)*
105+
*Defined in [types.ts:204](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L204)*
106106

107107
Sets the delimiters used for text interpolation within the template.
108108
Typically this is used to avoid conflicting with server-side frameworks that also use mustache syntax.
@@ -146,7 +146,7 @@ ___
146146

147147
`Optional` **moduleCache**: Record<string, [Module](module.md)\>
148148

149-
*Defined in [types.ts:121](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L121)*
149+
*Defined in [types.ts:121](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L121)*
150150

151151
Initial cache that will contain resolved dependencies. All new modules go here.
152152
`vue` must initially be contained in this object.
@@ -170,7 +170,7 @@ ___
170170

171171
**pathHandlers**: [PathHandlers](pathhandlers.md)
172172

173-
*Defined in [types.ts:308](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L308)*
173+
*Defined in [types.ts:308](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L308)*
174174

175175
Abstact path handling
176176

@@ -180,7 +180,7 @@ Abstact path handling
180180

181181
**addStyle**(`style`: string, `scopeId`: string \| undefined): void
182182

183-
*Defined in [types.ts:164](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L164)*
183+
*Defined in [types.ts:164](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L164)*
184184

185185
Called by the library when CSS style must be added in the HTML document.
186186

@@ -212,7 +212,7 @@ ___
212212

213213
`Optional`**customBlockHandler**(`block`: [CustomBlock](customblock.md), `filename`: string, `options`: [Options](options.md)): Promise<[CustomBlockCallback](../README.md#customblockcallback) \| undefined\>
214214

215-
*Defined in [types.ts:330](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L330)*
215+
*Defined in [types.ts:330](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L330)*
216216

217217
Called for each custom block.
218218

@@ -249,7 +249,7 @@ ___
249249

250250
**getFile**(`path`: string): Promise<[File](file.md)\>
251251

252-
*Defined in [types.ts:142](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L142)*
252+
*Defined in [types.ts:142](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L142)*
253253

254254
Called by the library when it needs a file.
255255

@@ -282,7 +282,7 @@ ___
282282

283283
`Optional`**loadModule**(`path`: string, `options`: [Options](options.md)): Promise<[Module](module.md) \| undefined\>
284284

285-
*Defined in [types.ts:301](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L301)*
285+
*Defined in [types.ts:301](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L301)*
286286

287287
Called when the lib requires a module. Do return `undefined` to let the library handle this.
288288

@@ -315,7 +315,7 @@ ___
315315

316316
`Optional`**log**(`type`: string, ...`data`: any[]): void
317317

318-
*Defined in [types.ts:280](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L280)*
318+
*Defined in [types.ts:280](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L280)*
319319

320320
Called by the library when there is somthing to log (eg. scripts compilation errors, template compilation errors, template compilation tips, style compilation errors, ...)
321321

docs/api/interfaces/pathhandlers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
**extname**(`filepath`: string): string
2323

24-
*Defined in [types.ts:25](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L25)*
24+
*Defined in [types.ts:25](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L25)*
2525

2626
#### Parameters:
2727

@@ -37,7 +37,7 @@ ___
3737

3838
**resolve**(`absoluteFilepath`: string, `dependencyPath`: string): string
3939

40-
*Defined in [types.ts:29](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/d3200d4/src/types.ts#L29)*
40+
*Defined in [types.ts:29](https://github.com/FranckFreiburger/vue3-sfc-loader/blob/87b69d5/src/types.ts#L29)*
4141

4242
#### Parameters:
4343

0 commit comments

Comments
 (0)