     .pipe browserSync.reload stream: yes
 
 
-gulp.task 'server', [ 'compile-scripts' ], ->
+gulp.task 'server', [ 'compile' ], ->
+
+  gulp.start [ 'run-server' ]
+
+
+gulp.task 'run-server', ->
 
   browserSync.init
     notify       : no
+    open         : openApp
     port         : 9000
     server       :
       baseDir    : './dist'

    .pipe gulp.dest './dist/css/'


gulp.task 'clean', (cb) ->

  rimraf './dist', cb


gulp.task 'production', [ 'clean' ], ->

  production = yes

  gulp.start 'build', ->
    gutil.log 'Building for production is completed,
               you can now deploy ./dist folder'


gulp.task 'build',   [
  'compile-scripts', 'styles', 'entry-point', 'export-kd', 'images'
]

gulp.task 'default', [

# kind of SPA mode.
# see:
# https://github.com/BrowserSync/browser-sync/issues/204#issuecomment-60410751
historyFallback = require 'connect-history-api-fallback'

openApp         = yes
globalBundler   = null

paths           =
