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 trialTom Checkley
25,165 Pointsputting files into a dev directory then utputting them to dist on build. I need to change my base can anyone explain?
I've followed this course all the way through and have used it in my own project and added to it. I want to be able to save all files in a dev directory that will output to dist on build, the following code works fine but it creates a directory in dist called dev which i don't want. I think I need to change the base but can't work out how.
gulp.task("build", ['minifyScripts', 'compileSass', 'images'], function(){
return gulp.src(["dev/css/build.css",
"dev/js/app.min.js",
'dev/css/*.css',
'dev/index.html',
'dev/img/**',
'dev/fonts/**'],
{base: './'})
.pipe(gulp.dest('dist'));
});
});
1 Answer
faraz
Courses Plus Student 21,474 PointsTry setting your base to 'dev' -- that should prevent the dev directory from being created inside dist.
Tom Checkley
25,165 PointsTom Checkley
25,165 PointsThanks