diff options
author | Camil Staps | 2015-05-13 17:06:51 +0200 |
---|---|---|
committer | Camil Staps | 2015-05-13 17:06:51 +0200 |
commit | ac9a9e119e66a55db2100d2bdcfa0914a1c78d96 (patch) | |
tree | a38ee2a55ef4724b6e49485d6219fea5a0b52087 | |
parent | Logout (diff) |
Separate build task for own styles & 3rd-party styles
-rw-r--r-- | gulpfile.js | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/gulpfile.js b/gulpfile.js index 181462c..1aa41fc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -30,7 +30,7 @@ gulp.task('default', [], function() { }); gulp.task('all', [], function() { - gulp.start('fonts', 'styles', 'scripts', 'images', 'jade'); + gulp.start('fonts', 'styles', 'scripts', 'images', 'jade', '3rd-party-styles'); }); gulp.task('rebuild', ['clean'], function() { @@ -55,7 +55,7 @@ gulp.task('fonts', function() { .pipe(gulp.dest(dst)); }); -gulp.task('styles', function() { +gulp.task('3rd-party-styles', function() { var baseContent = '@import "./bower_components/bootstrap/less/bootstrap.less";' + @@ -77,8 +77,7 @@ gulp.task('styles', function() { var fileList = [ './bower_components/bootswatch/' + bootswatch_theme + '/bootswatch.less', - './bower_components/fontawesome/css/font-awesome.css', - './src/css/style.less' + './bower_components/fontawesome/css/font-awesome.css' ]; var dst = './build/assets/css'; @@ -92,7 +91,6 @@ gulp.task('styles', function() { return file; } }})) - //.pipe(changed(dst, { destination: 'style.css' })) .pipe(gulpif(isBootswatchFile, foreach(function(stream, file) { var themeName = path.basename(path.dirname(file.path)), content = replaceAll(baseContent, bootswatch_theme, themeName), @@ -117,6 +115,24 @@ gulp.task('styles', function() { .pipe(gulp.dest(dst)); }); +gulp.task('styles', function() { + + var sources = [ + './src/css/style.less', + './src/css/forms.less' + ]; + + var dst = './build/assets/css'; + var dst_filename = 'style.css'; + + return gulp.src(sources) + .pipe(changed(dst, {destination: dst_filename})) + .pipe(less()) + .pipe(concat(dst_filename)) + .pipe(minifycss()) + .pipe(gulp.dest(dst)); +}); + gulp.task('scripts', function(){ var fileList = [ './bower_components/jquery/dist/jquery.min.js', |