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 trialBen Zuba
13,575 Pointsuserref asset out of date, updated code to v3 can't get app.js and css files to build in dist folder.
Heres my html task following v-3 standards
gulp.task('compileSass', function() {
return gulp.src(options.src + "/scss/application.scss")
.pipe(maps.init())
.pipe(sass())
.pipe(maps.write('./'))
.pipe(gulp.dest(options.src + '/css'));
});
```javascript
```javascript
'use strict';
const gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
sass = require('gulp-sass'),
maps = require('gulp-sourcemaps'),
del = require('del'),
useref = require('gulp-useref'),
iff = require('gulp-if'),
csso = require('gulp-csso');
var options = {
src: 'src',
dist: 'dist'
}
// gulp.task('concatScripts', function() {
// return gulp.src([
// 'js/jquery.js',
// 'js/sticky/jquery.sticky.js',
// 'js/main.js'])
// .pipe(maps.init())
// .pipe(concat('app.js'))
// .pipe(maps.write('./'))
// .pipe(gulp.dest('js'));
// });
// gulp.task('minifyScripts',["concatScripts"], function(){
// return gulp.src('js/app.js')
// .pipe(uglify())
// .pipe(rename('app.min.js'))
// .pipe(gulp.dest('js'));
// });
gulp.task('compileSass', function() {
return gulp.src(options.src + "/scss/application.scss")
.pipe(maps.init())
.pipe(sass())
.pipe(maps.write('./'))
.pipe(gulp.dest(options.src + '/css'));
});
gulp.task('watchFiles', function() {
gulp.watch(options.src + '/scss/**/*.scss', ['compileSass']);
})
gulp.task('clean', function() {
del([options.dist, options.src + '/css/application.css*']);
});
gulp.task('html', ['compileSass'], () => {
return gulp.src('/src/index.html')
.pipe(useref())
.pipe(iff('*.js', uglify()))
.pipe(iff('*.css', csso()))
.pipe(gulp.dest(options.dist));
});
gulp.task("build", ['html'], function() {
return gulp.src([options.src + "/img/**", options.src + "/fonts/**"], { base: options.src})
.pipe(gulp.dest(options.dist));
});
gulp.task('serve', ['watchFiles']);
gulp.task("default", ["clean"], function() {
gulp.start('build');
});
```javascript
1 Answer
John Perry
Full Stack JavaScript Techdegree Graduate 41,012 PointsWatch the video; he mentions the commented out code at 13:41
Ben Zuba
13,575 PointsBen Zuba
13,575 PointsSo I figured it out.