Skip to content

Instantly share code, notes, and snippets.

@TiagoTi
Last active June 29, 2018 21:04
Show Gist options
  • Save TiagoTi/4cb5c449e429b3c081ea58db1e0446cb to your computer and use it in GitHub Desktop.
Save TiagoTi/4cb5c449e429b3c081ea58db1e0446cb to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var pug = require('gulp-pug');
gulp.task('default1', function() {
console.log('ola mundo');
});
gulp.task('where-do-we-go-now', function(){
console.log('https://github.com/gulpjs/gulp/tree/v3.9.1/docs/recipes');
console.log('https://github.com/gulpjs/gulp/blob/v3.9.1/docs/README.md#articles');
});
var gulp = require('gulp');
var pug = require('gulp-pug');
var less = require('gulp-less');
var minifyCSS = require('gulp-csso');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('html', function(){
return gulp.src('client/templates/*.pug')
.pipe(pug())
.pipe(gulp.dest('build/html'))
});
gulp.task('css', function(){
return gulp.src('client/templates/*.less')
.pipe(less())
.pipe(minifyCSS())
.pipe(gulp.dest('build/css'))
});
gulp.task('js', function(){
return gulp.src('client/javascript/*.js')
.pipe(sourcemaps.init())
.pipe(concat('app.min.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('build/js'))
});
gulp.task('default', [ 'default1','html', 'css', 'js' ]);
//https://css-tricks.com/gulp-for-beginners/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment