   grunt.loadNpmTasks 'grunt-contrib-clean'
   grunt.loadNpmTasks 'grunt-contrib-coffee'
   grunt.loadNpmTasks 'grunt-contrib-cssmin'
-  grunt.loadNpmTasks 'grunt-contrib-jshint'
   grunt.loadNpmTasks 'grunt-contrib-stylus'
   grunt.loadNpmTasks 'grunt-env'
   grunt.loadNpmTasks 'grunt-este'

    if grunt.option 'stage'
      tasks = tasks.concat [
        "cssmin:#{app}"
        "replace:updateIndexEsteLibraryVersion"
        "esteBuilder:#{app}"
      ]
    grunt.task.run tasks

  grunt.registerTask 'run', 'Run stack.', (app = 'app') ->
    grunt.task.run [
      if grunt.option 'stage' then 'env:stage' else 'env:development'
      "bgShell:#{app}"
      "esteWatch"


    # run tasks

    replace:
      esteLibraryVersion:
        src: 'server/app/views/index.jade'
        overwrite: true
        replacements: [
          from: /\(v.+\)/g
          to: ->
            version = require('./bower_components/este-library/bower.json').version
            "(v#{version})"
        ]

    env:
      development:
        NODE_ENV: 'development'
