Java Script MVC steal/buildjs - remove empty .js files

When I try to do build with steal/buildjs of Javascript MVC, envJS silently fail to compress and check JavaScript files for errors.

I read documentation for envJS and found there that if in some case you try to build empty .js files envJS will fail.

Obviously it is in my case, and later I founded some of empty .js files.

I need a way to add checking for empty .js and .ejs files before build.

What would be the most efficient way to do check for empty .js and .ejs when running steal/buildjs?

Answers


I would use find:

find . -type f \( -name *.js -o -name *.ejs \) -size 0 -print 

Change -print to -delete when you're sure.


Need Your Help