GitHub - sktguha/programmaticTemplates: write code snippets in full blown javascript(node.js) instead of simple static json

1 min read Original article ↗

TODO: will add soon the powerful replacer script after removing company specific data, which I am using to create component,types,reducers,actions,middleware and tests also, saving 150+ lines of manual typing, which was the main motivation behind this vscode extension.

Write code snippets in full blown javascript(node.js) instead of simple static json, thus giving more power in the hands of the developer.The idea is similar to code snippets in vscode, but here the difference is you can specify any arbitrary node.js script to run.

So if you select some text in vscode and press a shortcut key , your script is given the selected text as first argument(second argument has various details like absolutePath etc) and whatever is returned from your script , the selected text will be changed to that value

Only run scripts from sources/people you trust. As there is NO SANDBOXING mechanism whatsoever yet #1