Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBoris Kamp
16,660 PointsGulp copy or import vendor plugins for use in build
Hi guys!
I'm setting up my own Gulp workflow based on this https://github.com/synapticism/wordpress-gulp-starter-kit starter kit. I want to include the following modules in my builds conditionally:
- Bootstrap partials
- ParsleyJS
- Photoswipe
I've installed them all with npm install, now I wonder how I should inlcude them in my Gulp task.
All modules have .(s)css
and .js
files I need to include.
I see two options:
- copy the files over from the
node_modules
folder to my own vendor folders for both js and stylesheets - import them dynamically in my Gulp tasks from the
node_modules
folder. This way I don't have to copy them over each time.
In my opinion #2 is the smartest, although Im not sure it's the best. I would like to get some insight on this from some more experienced Gulp developers. I'm not getting #2 to work (only partially) so was wondering if I should stop at all and go to #1, or continue.
Thanks guys!
Huston Hedinger How would a pro like you do this?