Skip to content

Conversation

@agch-dev
Copy link

Issue

This PR addresses part of this issue #3.

Description

This PR adds the ability to customize the files that you want to be listed when selecting optional files to create.

It does so by adding a setting to VSCode that can be set to certain defined presets or custom options.

For more information on how this new system works, I added some documentation to the readme.

It also generalizes the ability to import an optional file in the component file and creates the possibility of importing the component in the optional files so for example for test files, you would want to import the component so the extension can do it for you.

I added two presets aside from the two existing ones that I felt were common enough that it justified their addition but if you disagree let me know and I can remove them. If there is any other preset that you think would be good to add, also let me know.

Notes:

This is my first time working with Typescript so sorry if I butchered the code. Any comments on how to improve it will be most welcomed.

For some reason, my config of VSCode must be different and it added some spaces to format things like imports and function calls. I can work on reversing those changes if it was intentional the lack of spaces in those cases. Please let me know how you want me to proceed regarding this.

Preview

Extension with new feature in action:

Here is what settings I had set for said preview:
imagen

@davidmwhynot
Copy link

davidmwhynot commented Jul 29, 2021

@ee92 Will this ever be merged?

"displayName": "folderize",
"description": "Easily convert a Javascript file into a folder with an index file without breaking imports / exports. Supports .js, .jsx, .ts, .tsx.",
"version": "0.0.5",
"version": "0.0.6",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are adding new features, I believe this should be a minor version bump.

Suggested change
"version": "0.0.6",
"version": "0.1.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants