neutralinojs-cli icon indicating copy to clipboard operation
neutralinojs-cli copied to clipboard

Feat: ignore files support added

Open viralgupta opened this issue 11 months ago • 3 comments

closes #218

docs for this pr #309

viralgupta avatar Mar 27 '24 21:03 viralgupta

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?

viralgupta avatar Apr 11 '24 05:04 viralgupta

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.

shalithasuranga avatar Apr 11 '24 06:04 shalithasuranga

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.

viralgupta avatar Apr 11 '24 08:04 viralgupta

This is now merged, Thanks :) Please note that I've done some changes in: https://github.com/neutralinojs/neutralinojs-cli/commit/2a6d21c6466a31c20eb41fde67684f2bca63305b

shalithasuranga avatar May 07 '24 07:05 shalithasuranga