@rohal12/twee-ts 1.18.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/THIRD_PARTY_NOTICES +111 -0
- package/UNLICENSE +24 -0
- package/dist/bin/twee-ts.js +689 -9335
- package/dist/bin/twee-ts.js.map +1 -1
- package/dist/diagnostic-text-BRddVulf.cjs +26463 -0
- package/dist/diagnostic-text-BRddVulf.cjs.map +1 -0
- package/dist/diagnostic-text-CebYCTPQ.js +26040 -0
- package/dist/diagnostic-text-CebYCTPQ.js.map +1 -0
- package/dist/index.cjs +86 -9026
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +192 -415
- package/dist/index.d.ts +192 -415
- package/dist/index.js +4 -9206
- package/dist/lint-VayZI_jp.js +288 -0
- package/dist/lint-VayZI_jp.js.map +1 -0
- package/dist/options-DuBkFyqi.d.cts +28 -0
- package/dist/options-nc5NpnSc.d.ts +28 -0
- package/dist/plugins/rollup.cjs +172 -0
- package/dist/plugins/rollup.cjs.map +1 -0
- package/dist/plugins/rollup.d.cts +46 -0
- package/dist/plugins/rollup.d.ts +7 -12
- package/dist/plugins/rollup.js +130 -65
- package/dist/plugins/rollup.js.map +1 -1
- package/dist/plugins/vite.cjs +1926 -0
- package/dist/plugins/vite.cjs.map +1 -0
- package/dist/plugins/vite.d.cts +15 -0
- package/dist/plugins/vite.d.ts +5 -12
- package/dist/plugins/vite.js +1771 -448
- package/dist/plugins/vite.js.map +1 -1
- package/dist/types-BvI6pg2y.d.cts +389 -0
- package/dist/types-BvI6pg2y.d.ts +389 -0
- package/dist/watch-targets-BI7jYrwa.js +486 -0
- package/dist/watch-targets-BI7jYrwa.js.map +1 -0
- package/dist/watch-targets-C0Anuw17.cjs +575 -0
- package/dist/watch-targets-C0Anuw17.cjs.map +1 -0
- package/package.json +80 -27
- package/schemas/twee-ts.config.schema.json +55 -17
- package/dist/index.js.map +0 -1
- package/dist/paths-CUv1qfz-.js +0 -6926
- package/dist/paths-CUv1qfz-.js.map +0 -1
- package/dist/types-D8Xfe0l8.d.ts +0 -71
package/dist/types-D8Xfe0l8.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
//#region src/types.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* All public interfaces for twee-ts.
|
|
4
|
-
*/
|
|
5
|
-
type OutputMode = 'html' | 'twee3' | 'twee1' | 'twine2-archive' | 'twine1-archive' | 'json';
|
|
6
|
-
type WordCountMethod = 'tweego' | 'whitespace';
|
|
7
|
-
type InlineSource = {
|
|
8
|
-
filename: string;
|
|
9
|
-
content: string | Buffer;
|
|
10
|
-
};
|
|
11
|
-
type SourceInput = string | InlineSource;
|
|
12
|
-
interface CompileOptions {
|
|
13
|
-
/**
|
|
14
|
-
* Files, directories, or inline sources to compile. Directories are walked
|
|
15
|
-
* recursively; inside one, a symbolic link to a file is read, but a link to a
|
|
16
|
-
* directory is not followed (as in Tweego).
|
|
17
|
-
*/
|
|
18
|
-
sources: readonly SourceInput[];
|
|
19
|
-
/**
|
|
20
|
-
* Glob patterns for files to leave out of `sources`, matched against each file's
|
|
21
|
-
* path relative to the working directory (as `stats.files` lists it). Modules are not affected.
|
|
22
|
-
*/
|
|
23
|
-
exclude?: readonly string[];
|
|
24
|
-
/** Output mode. Default: 'html'. */
|
|
25
|
-
outputMode?: OutputMode;
|
|
26
|
-
/** Story format directory ID (e.g. 'sugarcube-2'). */
|
|
27
|
-
formatId?: string;
|
|
28
|
-
/** Name of the starting passage. Default: 'Start'. */
|
|
29
|
-
startPassage?: string;
|
|
30
|
-
/** Extra directories to search for story formats. */
|
|
31
|
-
formatPaths?: readonly string[];
|
|
32
|
-
/** Also search TWEEGO_PATH env for formats. Default: true. */
|
|
33
|
-
useTweegoPath?: boolean;
|
|
34
|
-
/** Module files to inject into <head>. */
|
|
35
|
-
modules?: readonly string[];
|
|
36
|
-
/** Raw HTML file to append to <head>. */
|
|
37
|
-
headFile?: string;
|
|
38
|
-
/** Trim passage whitespace. Default: true. */
|
|
39
|
-
trim?: boolean;
|
|
40
|
-
/** Twee2 compatibility mode. Default: false. */
|
|
41
|
-
twee2Compat?: boolean;
|
|
42
|
-
/** Enable debug/test mode option. Default: false. */
|
|
43
|
-
testMode?: boolean;
|
|
44
|
-
/** URLs to SFA-compatible index.json files for remote format lookup. */
|
|
45
|
-
formatIndices?: readonly string[];
|
|
46
|
-
/**
|
|
47
|
-
* Direct URLs to format.js files. Each URL's download is cached under that URL, and is
|
|
48
|
-
* looked up before the downloads shared by name and version.
|
|
49
|
-
*/
|
|
50
|
-
formatUrls?: readonly string[];
|
|
51
|
-
/** Disable remote format fetching. Default: false. */
|
|
52
|
-
noRemote?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Cancels the compile. Story format requests still in progress are aborted, and the compile
|
|
55
|
-
* rejects with the signal's reason. `watch()` aborts its builds, and stops watching, when it aborts.
|
|
56
|
-
*/
|
|
57
|
-
signal?: AbortSignal;
|
|
58
|
-
/**
|
|
59
|
-
* Milliseconds each story format request (an index or a format.js) may take before it fails
|
|
60
|
-
* with a warning and the next source is tried. 0 turns the limit off. Default: 30000.
|
|
61
|
-
*/
|
|
62
|
-
formatFetchTimeout?: number;
|
|
63
|
-
/** Map alias tags to canonical special tags (e.g. { library: 'script' }). */
|
|
64
|
-
tagAliases?: Record<string, string>;
|
|
65
|
-
/** Emit source file and line as data- attributes on passage elements. Default: false. */
|
|
66
|
-
sourceInfo?: boolean;
|
|
67
|
-
/** Word counting method. Default: 'tweego'. */
|
|
68
|
-
wordCountMethod?: WordCountMethod;
|
|
69
|
-
}
|
|
70
|
-
//#endregion
|
|
71
|
-
export { CompileOptions as t };
|