ventojs 0.6.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/LICENSE +21 -0
- package/README.md +138 -0
- package/esm/_dnt.shims.d.ts +5 -0
- package/esm/_dnt.shims.js +62 -0
- package/esm/_dnt.test_polyfills.d.ts +11 -0
- package/esm/_dnt.test_shims.d.ts +5 -0
- package/esm/deps/deno.land/std@0.178.0/_util/asserts.d.ts +10 -0
- package/esm/deps/deno.land/std@0.178.0/_util/asserts.js +21 -0
- package/esm/deps/deno.land/std@0.178.0/_util/os.d.ts +4 -0
- package/esm/deps/deno.land/std@0.178.0/_util/os.js +18 -0
- package/esm/deps/deno.land/std@0.178.0/path/_constants.d.ts +39 -0
- package/esm/deps/deno.land/std@0.178.0/path/_constants.js +46 -0
- package/esm/deps/deno.land/std@0.178.0/path/_interface.d.ts +26 -0
- package/esm/deps/deno.land/std@0.178.0/path/_interface.js +3 -0
- package/esm/deps/deno.land/std@0.178.0/path/_util.d.ts +11 -0
- package/esm/deps/deno.land/std@0.178.0/path/_util.js +161 -0
- package/esm/deps/deno.land/std@0.178.0/path/common.d.ts +13 -0
- package/esm/deps/deno.land/std@0.178.0/path/common.js +36 -0
- package/esm/deps/deno.land/std@0.178.0/path/glob.d.ts +83 -0
- package/esm/deps/deno.land/std@0.178.0/path/glob.js +361 -0
- package/esm/deps/deno.land/std@0.178.0/path/mod.d.ts +9 -0
- package/esm/deps/deno.land/std@0.178.0/path/mod.js +32 -0
- package/esm/deps/deno.land/std@0.178.0/path/posix.d.ts +86 -0
- package/esm/deps/deno.land/std@0.178.0/path/posix.js +442 -0
- package/esm/deps/deno.land/std@0.178.0/path/separator.d.ts +2 -0
- package/esm/deps/deno.land/std@0.178.0/path/separator.js +5 -0
- package/esm/deps/deno.land/std@0.178.0/path/win32.d.ts +91 -0
- package/esm/deps/deno.land/std@0.178.0/path/win32.js +909 -0
- package/esm/deps/deno.land/std@0.190.0/_util/asserts.d.ts +10 -0
- package/esm/deps/deno.land/std@0.190.0/bytes/copy.d.ts +27 -0
- package/esm/deps/deno.land/std@0.190.0/fmt/colors.d.ts +270 -0
- package/esm/deps/deno.land/std@0.190.0/front_matter/mod.d.ts +78 -0
- package/esm/deps/deno.land/std@0.190.0/front_matter/yaml.d.ts +4 -0
- package/esm/deps/deno.land/std@0.190.0/io/buffer.d.ts +81 -0
- package/esm/deps/deno.land/std@0.190.0/testing/_diff.d.ts +26 -0
- package/esm/deps/deno.land/std@0.190.0/testing/_format.d.ts +1 -0
- package/esm/deps/deno.land/std@0.190.0/testing/asserts.d.ts +284 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_error.d.ts +6 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_loader/loader.d.ts +4 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_loader/loader_state.d.ts +43 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_mark.d.ts +10 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_state.d.ts +5 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/binary.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/bool.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/float.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/function.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/int.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/map.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/merge.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/mod.d.ts +16 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/nil.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/omap.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/pairs.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/regexp.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/seq.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/set.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/str.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/timestamp.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_type/undefined.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/_utils.d.ts +19 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/parse.d.ts +35 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema/core.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema/default.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema/extended.d.ts +30 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema/failsafe.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema/json.d.ts +2 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema/mod.d.ts +5 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/schema.d.ts +22 -0
- package/esm/deps/deno.land/std@0.190.0/yaml/type.d.ts +28 -0
- package/esm/deps.d.ts +1 -0
- package/esm/deps.js +1 -0
- package/esm/mod.d.ts +7 -0
- package/esm/mod.js +28 -0
- package/esm/package.json +3 -0
- package/esm/plugins/escape.d.ts +2 -0
- package/esm/plugins/escape.js +16 -0
- package/esm/plugins/for.d.ts +2 -0
- package/esm/plugins/for.js +48 -0
- package/esm/plugins/if.d.ts +2 -0
- package/esm/plugins/if.js +32 -0
- package/esm/plugins/include.d.ts +2 -0
- package/esm/plugins/include.js +16 -0
- package/esm/plugins/js.d.ts +2 -0
- package/esm/plugins/js.js +11 -0
- package/esm/plugins/layout.d.ts +2 -0
- package/esm/plugins/layout.js +29 -0
- package/esm/plugins/set.d.ts +2 -0
- package/esm/plugins/set.js +44 -0
- package/esm/src/environment.d.ts +29 -0
- package/esm/src/environment.js +136 -0
- package/esm/src/loader.d.ts +14 -0
- package/esm/src/loader.js +19 -0
- package/esm/src/tokenizer.d.ts +8 -0
- package/esm/src/tokenizer.js +197 -0
- package/esm/test/comment.test.d.ts +1 -0
- package/esm/test/escape.test.d.ts +1 -0
- package/esm/test/for.test.d.ts +1 -0
- package/esm/test/if.test.d.ts +1 -0
- package/esm/test/include.test.d.ts +1 -0
- package/esm/test/js.test.d.ts +1 -0
- package/esm/test/layout.test.d.ts +1 -0
- package/esm/test/print.test.d.ts +1 -0
- package/esm/test/raw.test.d.ts +1 -0
- package/esm/test/set.test.d.ts +1 -0
- package/esm/test/tokenizer.test.d.ts +1 -0
- package/esm/test/utils.d.ts +23 -0
- package/package.json +25 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Environment, Filter } from "../src/environment.js";
|
|
2
|
+
import type { Loader } from "../src/loader.js";
|
|
3
|
+
export interface TestOptions {
|
|
4
|
+
template: string;
|
|
5
|
+
data?: Record<string, unknown>;
|
|
6
|
+
filters?: Record<string, Filter>;
|
|
7
|
+
expected: string;
|
|
8
|
+
init?: (env: Environment) => void;
|
|
9
|
+
includes?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function test(options: TestOptions): Promise<void>;
|
|
12
|
+
export declare class FileLoader implements Loader {
|
|
13
|
+
files: Record<string, string>;
|
|
14
|
+
constructor(files: Record<string, string>);
|
|
15
|
+
load(file: string): {
|
|
16
|
+
source: string;
|
|
17
|
+
data: Record<string, unknown>;
|
|
18
|
+
} | {
|
|
19
|
+
source: string;
|
|
20
|
+
data?: undefined;
|
|
21
|
+
};
|
|
22
|
+
resolve(from: string, file: string): string;
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "./esm/mod.js",
|
|
3
|
+
"name": "ventojs",
|
|
4
|
+
"version": "0.6.0",
|
|
5
|
+
"description": "🌬 A minimal but powerful template engine",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": "github:oscarotero/vento",
|
|
8
|
+
"homepage": "https://oscarotero.github.io/vento/",
|
|
9
|
+
"bugs": "https://github.com/oscarotero/vento/issues",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./esm/mod.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node test_runner.js"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@deno/shim-deno": "~0.16.1"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^18.11.9",
|
|
23
|
+
"picocolors": "^1.0.0"
|
|
24
|
+
}
|
|
25
|
+
}
|