var gulp = require('gulp');
var plumber = require('gulp-plumber');
var stylus = require('gulp-stylus');
var fastylus = require('fa-stylus');
var cssnano = require('gulp-cssnano');
var koutoSwiss = require('kouto-swiss');
var prefixer = require('autoprefixer-stylus');
var browserSync = require('browser-sync');
var uglify = require('gulp-uglify');

var srcPaths = {
  css: 'src/style/**/*.styl',
  mainStyl: 'src/style/main.styl'
};

var buildPaths = {
  build: 'dist/',
  css: 'dist/css/'
};

gulp.task('css', function() {
  gulp.src(srcPaths.mainStyl)
    .pipe(plumber())
    .pipe(stylus({
      use: [koutoSwiss(), prefixer(), fastylus()],
      compress: true
    }))
    .pipe(cssnano())
    .pipe(gulp.dest(buildPaths.css));
});

gulp.task('watch', function() {
  gulp.watch(srcPaths.css, ['css']);
});

gulp.task('browser-sync', function() {
  var files = [
    buildPaths.build
  ];

  browserSync.init(files, {
    port: '9000',
    server: {
      baseDir: buildPaths.build,
      routes: {
        "/vendor": "vendor"
      }
    },
    socket: {
      port: '9000',
      domain: 'localhost:9000'
    }
  });
});

gulp.task('default', ['css', 'watch', 'browser-sync']);

@@ -6,38 +6,14 @@
 ulp 
-= require('gulp');%0Avar plumber
+      
  = r
@@ -28,24 +28,16 @@
 gulp
--plumber
 ');%0Avar 
 styl
@@ -32,23 +32,28 @@
 ');%0Avar 
+fa
 stylus 
+   
 = requir
@@ -55,20 +55,18 @@
 equire('
-gulp
+fa
 -stylus'
@@ -72,25 +72,28 @@
 ');%0Avar 
-fa
 stylus 
+     
 = requir
@@ -87,34 +87,36 @@
      = require('
-fa
+gulp
 -stylus');%0Avar c
@@ -114,23 +114,27 @@
 ');%0Avar 
-cssnano
+uglify     
  = requi
@@ -142,23 +142,22 @@
 e('gulp-
-cssnano
+uglify
 ');%0Avar 
@@ -167,16 +167,17 @@
 toSwiss 
+ 
 = requir
@@ -199,23 +199,26 @@
 );%0Avar p
-refixer
+lumber    
  = requi
@@ -225,27 +225,63 @@
 re('
-autoprefixer-stylus
+gulp-plumber');%0Avar cssnano     = require('gulp-cssnano
 ');%0A
@@ -327,22 +327,27 @@
 ');%0Avar 
-uglify
+prefixer   
  = requi
@@ -346,35 +346,43 @@
  = require('
-gulp-uglify
+autoprefixer-stylus
 ');%0A%0Avar src
@@ -391,16 +391,40 @@
 ths = %7B%0A
+  js: 'src/js/**/*.js',%0A
   css: '
@@ -520,16 +520,34 @@
 dist/',%0A
+  js: 'dist/js/',%0A
   css: '
@@ -797,32 +797,168 @@
 ths.css));%0A%7D);%0A%0A
+gulp.task('js', function() %7B%0A  gulp.src(srcPaths.js)%0A    .pipe(plumber())%0A    .pipe(uglify())%0A    .pipe(gulp.dest(buildPaths.js));%0A%7D);%0A%0A
 gulp.task('watch
@@ -1010,16 +1010,52 @@
 css'%5D);%0A
+  gulp.watch(srcPaths.js,  %5B'js'%5D);%0A
 %7D);%0A%0Agul
@@ -1395,16 +1395,22 @@
  %5B'css',
+ 'js',
  'watch'

Cria task para comprimir js