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 trial

JavaScript

Aaron HARPT
Aaron HARPT
19,845 Points

gulp basics course

Can someone tell me what is wrong with my gulp task? Thanks.

gulp.task('concatScripts', function() { gulp.src(['scripts.js', 'jquery.js']) .pipe(gulpConcat('production.js')) .pipe(gulp.dest('js')); });

2 Answers

Emmanuel Plouvier
Emmanuel Plouvier
11,919 Points

Hi,

Can you post your complet gulpfile.js ?

Aaron HARPT
Aaron HARPT
19,845 Points

Here it is:

"use strict";

var gulp = require("gulp");
var gulpConcat = require("gulp-concat");
var sass = require("gulp-sass");


gulp.task("hello", function(){
    console.log("hello");
});     

gulp.task('concatScripts', function() {
    return gulp.src(['scripts.js', 'jquery.js'])
.pipe(gulpConcat('production.js'))
.pipe(gulp.dest('js'));
});

gulp.task("compileSass", function(){
gulp.src("src/main.scss")
.pipe(sass())
.pipe(gulp.dest("css/main.css"));
});

gulp.task("default", ["hello","concatScripts", "compileSass"], function(){
    console.log("default task");
});