cedaro / grunt-wp-i18n

Internationalize WordPress themes and plugins with Grunt.
MIT License
160 stars 25 forks source link

windows and deep paths #52

Closed ctalkington closed 9 years ago

ctalkington commented 9 years ago

Windows has a limit of ~250 char path when used with php.

it would seem even though node_modules is excluded, its still having subdirs looped over. this causes issues with grunt packages like grunt-contrib-imagemin which is 5+ levels deep of node_modules

I realize this project mainly pulls in i18n tools but i felt this should be brought up.

bradyvercher commented 9 years ago

Hi @ctalkington, would you mind testing out the skip-excluded-dirs branch to see if it fixes this issue for you?

A nice bonus is that this "should" help speed up the makepot task since it won't have to test every file in an excluded directory.

shivapoudel commented 9 years ago

@bradyvercher file scan ignorance for the excluded dirs was really awesome. Great job xD

ctalkington commented 9 years ago

@bradyvercher this def fixes makepot buidling, for some reason addtextdomain is stalling, trying to figure out if this is related to change or previously happened.

ctalkington commented 9 years ago

ok seems i just didnt give it long enough, and i hadnt run it with this many php files before. have you considered adding some verbose lines to better track whats getting called by the tasks?

bradyvercher commented 9 years ago

@shivapoudel Thanks!

@ctalkington Glad it was a relatively easy fix. I'll try to get that merged soon.

That addtextdomain task can definitely be pretty slow since each file has to be passed to the PHP script separately. I've looked into ways to speed that up, but haven't found anything worthwhile.

There's an issue for adding verbose feedback (#25), but it's not something I've had the time to take on. Feel free to leave some feedback on that ticket or submit a PR if there's anything in particular you'd like to see, though.

ctalkington commented 9 years ago

@bradyvercher much appreciated, it was a show stopper when using imagemin in my process.

bradyvercher commented 9 years ago

Shipped in v0.5.2!

ctalkington commented 9 years ago

thanks!