@caleuche/core 0.2.0 → 0.4.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.
Files changed (3) hide show
  1. package/README.md +13 -0
  2. package/dist/index.cjs.js +7502 -11
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -40,6 +40,19 @@ const output: CompileOutput = compileSample(sample, { name: "World" }, options);
40
40
  // output.items will contain the generated files
41
41
  ```
42
42
 
43
+ ### Template Built-ins
44
+
45
+ For use in authoring templates. All functions described below are ingested by Caleuche when compiling code files.
46
+
47
+ #### Universal
48
+
49
+ - `<language>.valueOrEnvironment(useEnvironmentVariable: boolean, variableName: string, environmentVariable: string, value: string)` Generates code to assign a variable from a specified environment variable `environmentVariable` at runtime or from a provided value `value`.
50
+
51
+ #### Language Specific
52
+ - `go.includes(...items: string | {module: string; condition?: boolean})` Generates go import statement from list of dependencies. Exclude a dependency by setting condition to false.
53
+
54
+ - `csharp.usings(...items: string | {namespace: string; condition?: boolean})` Generates C# using statements from a list of namespaces. Exclude a namespace by setting condition to false.
55
+
43
56
  ## API
44
57
 
45
58
  ### Types