You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original intent of #4 was to improve upon a pain point I felt existed with generating files in the source tree.
Had to add *.css.d.ts to your .gitignore. And repeating it for other extensions.
Cleaning the repository would require additional work
Some folks just prefer less files when looking at their IDE for "real" files
However, upon actually using the alternative structure, I ran into more TypeScript issues than expected. Essentially ./foo.module.css is looked for exactly in that directory. It seems that it was not resolved via other names such as my/path/foo.module.css or similar.
While I have NOT dove deeper into the TS side, this issue led to something that may benefit the tool more.
Config file + subcommands
Introducing a config file (likely via cosmiconfig) will centralize the configuration for the pattern. The tool could then include a clean subcommand that deals with (2) issue.
The config also helps the future potential watch command (although I was originally leaning away from it).
This does not address the .gitignore case, although a init command would solve that.
Goals for this issue
Add cosmiconfig lilconfig
Add clean command
Alias root command to generate and/or get
Consider init command
The text was updated successfully, but these errors were encountered:
Note: lilconfig over cosmiconfig seems to be a trend for smaller dependencies. By default, it does not support YAML. For a smaller download size, I will gladly give up YAML (and adding it later is backwards-compatible).
Edit later (never hit comment). I added js-yaml to support YAML config, which seems to be common. Was easy enough to maintain (dependency + function + array).
Background
The original intent of #4 was to improve upon a pain point I felt existed with generating files in the source tree.
*.css.d.ts
to your.gitignore
. And repeating it for other extensions.However, upon actually using the alternative structure, I ran into more TypeScript issues than expected. Essentially
./foo.module.css
is looked for exactly in that directory. It seems that it was not resolved via other names such asmy/path/foo.module.css
or similar.While I have NOT dove deeper into the TS side, this issue led to something that may benefit the tool more.
Config file + subcommands
Introducing a config file (likely via
cosmiconfig
) will centralize the configuration for the pattern. The tool could then include aclean
subcommand that deals with (2) issue.The config also helps the future potential watch command (although I was originally leaning away from it).
This does not address the
.gitignore
case, although ainit
command would solve that.Goals for this issue
cosmiconfiglilconfigThe text was updated successfully, but these errors were encountered: