0

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?

tereško
  • 58,060
  • 25
  • 98
  • 150
user576700
  • 591
  • 1
  • 6
  • 15

1 Answers1

0

I would use find:

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

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

Community
  • 1
  • 1
noah
  • 21,289
  • 17
  • 64
  • 88