Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Well, the best suggestion I have would simply be to “ignore the folder”. ??

    Realistically, theme-check is naive. On the whole, I’d prefer it to stay that way, given the intended audience. Better to throw an invalid warning that a smart reviewer can ignore than to hide a real warning which needs to be fixed.

    If this folder is going into the theme ZIP file that will be released, then it’s valid and should be fixed. If that folder won’t be in the theme’s ZIP, then it won’t come up when the theme is uploaded or reviewed anyway (because it won’t be part of the theme anymore), and so it doesn’t matter. The only place this warning will appear is in your dev environment, and you can ignore it… or change the code to not read that folder for your own copy. I just don’t see that giving theme authors a way for the code to blanket ignore whole directories makes any sense on our end.

    Note that I don’t use Grunt, and while I could make it ignore “node-modules” easily enough, I’d also have to put in code that deletes that directory outright in any uploaded theme if I did so (like it does for /.svn et al). Is this code that shouldn’t be in the released theme?

    Thread Starter Zé Fontainhas

    (@vanillalounge)

    Thanks.

    No, it won’t make it to the final ZIP, yes it will be released, and I can see the point againts opening a door to exceptions. That said, I can also see the opposite point: this is a local theme check, after all, and when a theme author releases his work, he should be aware that it will be checked with a “more strict” version of the plugin.

    Not a big issue, though. All those node_module warnings just look… dirty . Maybe I’ll work on patching my ocd before patching the plugin, then ??

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    For reference, we use the same checks on the theme uploader part here on .org that are in the theme-check plugin. So, no “more strict” or anything like that. The base code is different, but everything in the plugin’s “checks” directory is used verbatim. That’s why I wrote it that way. ??

    The base code is mostly just loading the files into memory and pretty-output, sort of thing.

    I have the same question/issue. Maybe someday you may add something like .gitignore or exclude folder via code filter ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to ignore a folder (node_modules)?’ is closed to new replies.