vscode-generate-react-component icon indicating copy to clipboard operation
vscode-generate-react-component copied to clipboard

Feature request: Conditional files

Open loopmode opened this issue 7 years ago • 1 comments

While we can use conditionals inside files, it would be awesome if we could use files conditionally.

My use case is to let the user decide css or scss - and then copy only one of the files from the template. This seems easier than making file extensions configurable, plus users could add flags for test and readme files to be generated.

Haven't thought much about how to actually make this work :) Maybe some kind of magic filename syntax á la:

my-template/if--scss--stylesheet.scss my-template/if--!scss--stylesheet.css my-template/if--test--__ComponentName__.test.js

Doable or hard? :)

loopmode avatar Oct 14 '17 15:10 loopmode

where the extension settings is

lijianl avatar Apr 30 '18 08:04 lijianl