Search code examples
phpwordpressgulpbower

How to avoid bower_components directory during the publishing of a theme?


I am developing a wordpress theme using sage. The issue I am facing is the theme refers to the bower_components directory. The question is whether I have to include this bower_components directory for distribution? I also have a dist folder for css and scripts. Please let me know what is the correct procedure of distributing a theme that is developed using bower_components?


Solution

  • So long as you’re compiling all assets needed for the theme, then you don’t need to include the “raw” packages—such as npm modules and Bower components—in your theme. These are just artifacts from your build process.