API reference
settings.json and blueprintor.config.js share one format.
interface BlueprintorConfig { blueprints: Blueprint[];}Where the config lives
Section titled “Where the config lives”| Config | Where | Marker in the list |
|---|---|---|
| Global | blueprintor.defaultConfig in VS Code settings.json |
🌐 |
| Local | blueprintor.config.js in the root of the workspace |
📦 |
The local file is a CommonJS module, so it can contain code (helpers, loops, "x".repeat(3)). settings.json is plain JSON: the same fields, but no code.
A complete example
Section titled “A complete example”A blueprint with one variable, one snippet and one file. Local form:
module.exports = { blueprints: [ { title: "React component", variables: [{ key: "name", prompt: "Component name" }], snippets: { component: [ "export function {name.pascal}() {", " return (", " <div>", " <div></div>", " </div>", " )", "}", ], }, structure: { files: [{ name: "{name.pascal}.tsx", snippet: "component" }], }, }, ],};The same blueprint in settings.json:
{ // ...
"blueprintor.defaultConfig": { "blueprints": [ { "title": "React component", "variables": [{ "key": "name", "prompt": "Component name" }], "snippets": { "component": [ "export function {name.pascal}() {", " return (", " <div>", " <div></div>", " </div>", " )", "}" ] }, "structure": { "files": [{ "name": "{name.pascal}.tsx", "snippet": "component" }] } } ] }}Reference
Section titled “Reference”BlueprintFields, titles, priority and merging.
VariablesQuestions asked before anything is created.
SnippetsReusable texts for files.
Files and foldersThe structure to create and the rules for names.
PlaceholdersInsert values in five forms.
Running a blueprintWhat happens step by step, and every error.