 # Task - remove the `public/` directory
 task 'clean', 'remove the public/ directory', ->
   fs.removeSync publicDir
-  logging.warn "Removed the public/ directory."
+  logging.warn 'Removed the public/ directory.'
 
 # Task - run tests
 task 'test', 'run tests', ->


# Task - compile coffeescripts and copy assets into `public/` directory
task 'build', 'compile coffeescripts and copy assets into public/ directory', ->
  logging.info "Building project..."
  watch.setEnv (opts.env ? 'development'), opts
  fs.removeSync publicDir
  watch.compileDir clientDir


# Task - install packages
task 'install', 'install packages', ->
  logging.info 'Installing packages...'
  pkgs = opts.arguments[2..]
  if pkgs.length > 0
    # install the packages
    pkgmgr.install pkg for pkg in pkgs
  else
    # install all dependencies listed in component.json
    config = require('component.json')
    pkgmgr.install pkg for pkg, version of config.dependencies

# Task - update packages
task 'update', 'update packages', ->

# Task - watch files and compile as needed
task 'watch', 'watch files and compile as needed', ->
  logging.info 'Watching project...'
  watch.setEnv (opts.env ? 'development'), opts
  fs.removeSync publicDir

