neutralinojs-cli
neutralinojs-cli copied to clipboard
Feat: ignore files support added
Hi @shalithasuranga, thank you for highlighting best practices. I've removed glob
as a dependency and replaced it with anymatch, which is the same library utilized by chokidar in autoReloadExclude
. By including anymatch
in package.json, we avoid increasing the size of node_modules
and instead rely on an existing subdependency.
However, the format for excluding files in cli.autoReloadExclude
(".*\\.scss$|.*\\.less$"
) differs from the format we use for cli.resourceIgnore
files (["*.ts", "*.tsx"]
). In cli.resourceIgnore
, we use an array of patterns rather than a single string with patterns separated by |
. Should we maintain a consistent format for ignoring files throughout the configuration file?
Thanks so much for your update. Could you please implement this the same as the autoReloadExclude
option without linking another dependency? Thank you :tada: I think all developers who use Neutralinojs know about Regex, so we don't need to worry about using an array :tada:
Edit: Also, please use Exclude
term instead of Ignore
to match the existing features.
Hi @shalithasuranga, I have implemented regex pattern matching and dropped glob pattern matching. I just wanted to confirm: should we drop glob pattern matching even though this was what was requested in the original issue?
"resourcesIgnore": [".ts", "*.scss", "sandbox.js"]
If we are okay with regex matching, then I think we can merge this PR.
This is now merged, Thanks :) Please note that I've done some changes in: https://github.com/neutralinojs/neutralinojs-cli/commit/2a6d21c6466a31c20eb41fde67684f2bca63305b