-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
80 lines (67 loc) · 1.77 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { Plugin } from 'rollup';
export interface RactiveOptions {
/**
* File extensions to process.
*
* @default ['.ractive.html', '.ractive', '.ract.html', '.ract']
*/
extensions?: string[];
/**
* Path prefix to limit processing.
*
* Recommended: 'views'
*/
root?: string;
/**
* Automatically export { template, css? } for templates with no script (code) sections.
*/
autoExport?: boolean;
/**
* Rename processed template files using this extension, if provided. This does not apply if no `outputDir` is provided.
*/
outputExtension?: string;
/**
* Path to write processed templates. This is useful for other rollup plugins that don't use rollup to resolve imports, like plugin-typescript.
*/
outputDir?: string;
/**
* Set the mustache delimiters used by the ractive parser.
*
* @default ['{{', '}}']
*/
delimiters?: [string, string];
/**
* Set the static mustache delimiters used by the ractive parser.
*
* @default ['[[', ']]']
*/
staticDelimiters?: [string, string];
/**
* Set the triple mustache delimiters used by the ractive parser.
*
* @default ['{{{', '}}}']
*/
tripleDelimiters?: [string, string];
/**
* Set the static triple mustache delimiters used by the ractive parser.
*
* @default ['[[[', ']]]']
*/
staticTripleDelimiters?: [string, string];
/**
* Output non-ascii characters in templates as unicode escape sequences.
*
* @default false
*/
escapeUnicode?: boolean;
/**
* Output a js function for each expression in the template to avoid having to build it at runtime.
*
* @default true
*/
csp?: boolean;
}
/**
* Compile Ractive templates into ES modules.
*/
export default function ractive(opts?: RactiveOptions): Plugin;