Replace toml config with a javascript file
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
{
|
||||
"resources":{
|
||||
"includes":[{"pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"}]},
|
||||
"bundles":[]
|
||||
"resources": {
|
||||
"includes": [
|
||||
{"pattern": "\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"},
|
||||
{"pattern": "\\Qinit/index.d.ts\\E"},
|
||||
{"pattern": "\\Qinit/index.js\\E"},
|
||||
{"pattern": "\\Qinit/README.md\\E"}
|
||||
]
|
||||
},
|
||||
"bundles": []
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# {{ name }}
|
||||
Vendored
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Print a message to the console
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
declare function echo(message: string): void
|
||||
|
||||
/**
|
||||
* Prompt a user for text input
|
||||
*
|
||||
* @param text - The text to display for the prompt
|
||||
* @param def - A default value
|
||||
*/
|
||||
declare function prompt(text: string, def?: string): string
|
||||
|
||||
/**
|
||||
* Prompt a user for text input
|
||||
*
|
||||
* @param text - The text to display for the prompt
|
||||
* @param def - A default value
|
||||
*/
|
||||
declare function promptBoolean(text: string, def?: boolean): boolean
|
||||
|
||||
/**
|
||||
* Renders a template
|
||||
*
|
||||
* @param name - The template name
|
||||
* @param context - The template context
|
||||
*/
|
||||
declare function render(name: string, context: any): string
|
||||
|
||||
/**
|
||||
* Write a string to a file
|
||||
*
|
||||
* @param input - The content of the file
|
||||
* @param output - The output path
|
||||
*/
|
||||
declare function write(input: string, output: string): void
|
||||
|
||||
/**
|
||||
* Copy a file
|
||||
*
|
||||
* @param input - The input path
|
||||
* @param output - The output path
|
||||
*/
|
||||
declare function copy(input: string, output: string): void
|
||||
@@ -0,0 +1,7 @@
|
||||
echo("Example")
|
||||
|
||||
const name = prompt("Project name")
|
||||
|
||||
const ctx = {name: name}
|
||||
|
||||
write(render("README.md", ctx), "README.md")
|
||||
Reference in New Issue
Block a user