More gulpfile cleanup

This commit is contained in:
Jeff Avallone 2015-11-01 11:10:22 -05:00
parent 4c5e176cea
commit 2a338595d5

View File

@ -79,9 +79,7 @@ gulp.task('markup', 'Build markup into ./build directory.', ['markup:svg_styles'
bustCache: true bustCache: true
})) }))
.on('error', notify.onError()) .on('error', notify.onError())
.pipe(rename(function(path) { .pipe(rename({ extname: '.html' }))
path.extname = '.html';
}))
.pipe(gulp.dest(config.buildRoot)); .pipe(gulp.dest(config.buildRoot));
}); });
@ -91,10 +89,10 @@ gulp.task('markup:svg_styles', false, function() {
includePaths: bourbon.includePaths includePaths: bourbon.includePaths
})) }))
.on('error', notify.onError()) .on('error', notify.onError())
.pipe(rename(function(path) { .pipe(rename({
path.dirname = ''; dirname: '',
path.basename = 'svg_styles'; basename: 'svg_styles',
path.extname = '.hbs'; extname: '.hbs'
})) }))
.pipe(gulp.dest('./tmp/build')) .pipe(gulp.dest('./tmp/build'))
}); });
@ -106,9 +104,7 @@ gulp.task('styles', 'Build stylesheets into ./build directory.', function() {
includePaths: bourbon.includePaths includePaths: bourbon.includePaths
})) }))
.on('error', notify.onError()) .on('error', notify.onError())
.pipe(rename(function(path) { .pipe(rename({ dirname: '' }))
path.dirname = '';
}))
.pipe(sourcemaps.write('.')) .pipe(sourcemaps.write('.'))
.pipe(gulp.dest(config.buildPath('css'))) .pipe(gulp.dest(config.buildPath('css')))
}); });
@ -123,9 +119,7 @@ gulp.task('scripts', 'Build scripts into ./build directory', function() {
.pipe(source('./src/js/main.js')) .pipe(source('./src/js/main.js'))
.pipe(buffer()) .pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true })) .pipe(sourcemaps.init({ loadMaps: true }))
.pipe(rename(function(path) { .pipe(rename({ dirname: '' }))
path.dirname = '';
}))
.pipe(sourcemaps.write('.')) .pipe(sourcemaps.write('.'))
.pipe(gulp.dest(config.buildPath('js'))); .pipe(gulp.dest(config.buildPath('js')));
}); });