         files: ['src/*.coffee', 'Gruntfile.coffee']
         tasks: ['coffeelint']
       }
-      coffee: {
-        files: ['src/*.coffee']
-        tasks: ['coffee:dev']
+      browserifyDev: {
+        files: ['src/*.coffee', 'dev/*.coffee']
+        tasks: ['browserify:dev']
+      }
+      browserifyTest: {
+        files: ['src/*.coffee', 'test/*.coffee']
+        tasks: ['browserify:test']
       }
     }
 

    connect: {
      server: {
        options: {
          port: 3000
          base: '.'
        }
      }
    }

    # Run http server on port 3000 to test samples
    'http-server': {
      dev: {
        root: './demo/'


  # Load grunt tasks
  grunt.loadNpmTasks('grunt-browserify')
  grunt.loadNpmTasks('grunt-codo')
  grunt.loadNpmTasks('grunt-coffeelint')
  grunt.loadNpmTasks('grunt-contrib-clean')
  grunt.loadNpmTasks('grunt-mochify')
  grunt.loadNpmTasks('grunt-contrib-coffee')
  grunt.loadNpmTasks('grunt-contrib-connect')
  grunt.loadNpmTasks('grunt-contrib-uglify')
  grunt.loadNpmTasks('grunt-contrib-watch')
  #grunt.loadNpmTasks('grunt-http-server')
  grunt.loadNpmTasks('grunt-mocha')
  grunt.loadNpmTasks('grunt-saucelabs')

  # Set up the task aliases
  grunt.registerTask('lint', ['coffeelint:app', 'coffeelint:test'])
  grunt.registerTask('renew', ['clean'])
  grunt.registerTask('docs', ['codo'])
  grunt.registerTask('test', [
    'lint'
    'browserify:test'
    'mochify:test'
  ])
  grunt.registerTask('dev', [
    'test'
    'browserify:dev'
    'docs'
  ])
  grunt.registerTask('build', [
    'test'
    'coffee'
    'uglify'
    'browserify:standalone'
    'docs'
  ])
  if process.env.CI
    grunt.registerTask('ci', [
      'lint'
      'connect'
      'test'
      'browserify:test'
      'saucelabs-mocha'
    ])
  grunt.registerTask('default', ['build'])
