vscode-file-templates-ext
vscode-file-templates-ext copied to clipboard
Allow multiple variables
If the template file has multiple variable declarations, the user was only asked to supply the last variable. Because only one variable was asked to be defined, the Promise.all
never gets resolved and the file doesn't get created.
By extracting to a recursive function, the user will now be prompted to enter a value for every variable, and only after they're all supplied will the file be written.
An example template file used to test this:
#{another_test}
function a() {
#{test1}
#{test2}
var z = 1;
var y = 2;
var x = z;
let b = x + y;
console.log(b);
return b;
}
Thanks @taylonr, I'll test it as I'm having exactly the same problem
Is there any excepted date to the next release with this feature?