Skip to content
Mickael Daniel edited this page Apr 7, 2012 · 1 revision

Task - connect

The connect is a special little utility task working in tandem with the watch one.

It's a slight variation of the serve command, but includes / injects some socket.io magic to be able to reload any opened webpage in your browsers.

Basically, the idea is that anytime you change a watched files (js/css/templates, etc.), a new build is triggered and an event is emitted back to any connected clients to reload pages automatically.

connect: {

  intermediate: {
    port: 3000,
    logs: 'dev',
    dirs: true
  },

  publish: {
    port: 3001,
    logs: 'default',
    dirs: true
  }

}

Helpers

todo

» Home

» Tasks


» clean: Wipe the previous build dirs.

» mkdirs: Prepares the build dirs.

» concat: Concatenate files. (built-in)

» css: Concats, replaces @imports and minifies CSS files.

» min: Minify files using UglifyJS (built-in)

» rev: Automate the revving of assets and perform the hash rename

» usemin: Replaces references to non-minified scripts / stylesheets


» serve: Spawns up a basic local http server

» connect: livereload version of serve task

Clone this wiki locally