BlackbirdDigital / wp-theme-scaffold

Blackbird's WordPress Theme Scaffold
GNU General Public License v2.0
30 stars 1 forks source link

Improve JS workflow/folder structure #3

Closed cr0ybot closed 2 years ago

cr0ybot commented 3 years ago

I might be biased, but I think Birdstrap did the JS workflow pretty well. It had by default a "theme.js" file, but allowed any number of "entry" JS files to be created in the root and left the subfolders alone to be organized how you wish (though there were suggested folders like "modules") and babel allows for the standard ES6 imports to pull in modules as needed.

I've considered attempting to integrate wp-scripts, but it's so gutenberg-focused it might not be compatible. It attempts to handle the complete build workflow mostly behind-the-scenes and the way it expects to handle Sass/CSS via JS imports just wouldn't fly in a theme.