patronage / bubs-timber

Gulp + Timber + WP
Other
5 stars 1 forks source link

Revisit vendor assets and node_modules #117

Closed ccorda closed 2 years ago

ccorda commented 4 years ago

During our Docker investigation (#110 and #114), our usage of node_modules symlinked to assets/vendor proved to be a real stumbling block.

Our current solution is something of a hack done to replace bower, but I think we can find a better way.

A minimal might be be to use gulp to copy just the things we need on up. A mix of automation via useref, with the ability to define certain deps like vendored scss (bootstrap).

Another option would be more dramatic, using webpack to define and load deps that way: https://github.com/jaredpalmer/presspack/blob/master/src/index.js

chrisherold commented 4 years ago

I did this in bubs-static -- no symlink to pull in modules. think it should work on bubs

https://github.com/patronage/bubs-static/blob/master/gulpfile.babel.js#L112-L144

...for scripts anyway. for scss it looked like this

@import "../../node_modules/bootstrap/scss/functions";

ccorda commented 2 years ago

This has actually been pretty simple. We have a single volume line, and in the docker-compose, and continue as we were with using the timber/assets/vendor directory for scss/js.