Should we delete node_modules & bower_components before submitting template for approval?


I am trying hard to get my first HTML site template approved on ThemeForest.

I am new to bower & npm. I have learnt it to some level and built a HTML site template. I have never seen bower_components in URLs of CSS files (on ThemeForest site templates) . Should we delete these files from our folder before uploading template for approval?


Yes, this is the command line I use to zip my final file, which makes life easier

zip -r aspire -x *git* *node_modules* *bower_components* *.DS_Store* *.ds_store* *.editorconfig*

If you want to exclude a file or a folder, just ad it inside two *


Yes, you need to remove those folders.

Considering you’re already using npm I assume that you’re running some tasks with Gulp or Grunt. In this case I highly suggest you to create a task that generates a zip file ready for the submission. It’s easy to implement and it will save you a lot of time.


Ohh! That’s great. I didn’t know that we could create zip file with Gulp or Grunt. Can you please help me with some tutorial link from where I can learn it.

I’m currently using Gulp.

Thanks for the help.


It’s not a tutorial but a real example. This a Yeoman generator developed by me:

With this generator you can create a WP theme based on underscores. But this is not the point. In this file you can see how I generate the zip file.

Basically you need to define the files you want to include in the zip (the variable build_files which includes all the files except the ones defined with !). And then run gulp build to generate the zip file in the dist folder.

Just copy that file and remove the tasks you don’t need.


Thanks a lot…