         dest: 'build/'
         src: ['demo/scripts/*.coffee']
         ext: '.js'
-      bare:
+      src:
         options:
           bare: true
         expand: true  

        src: ['*.js']

    jade:
      options:
        pretty: true
      demo:
        dest: 'build/'
        expand: true
        ext: ['.html']
        src: ['demo/*.jade', '!demo/content.jade']
      tests:
        dest: 'build/'
        expand: true
        ext: ['.html']
        src: ['tests/**/*.jade']

    'string-replace':
      tests:

        src: ['build/src/**/*.js']

    stylus:
      all:
        expand: true
        dest: 'build/'
        src: ['demo/styles/*.styl', 'tests/mocha/*.styl']
        ext: ['.css']

    watch:
      options:
        nospawn: true
      coffee_demo:
        files: ['demo/scripts/*.coffee']
        tasks: ['coffee:demo']
      coffee_src:
        files: ['index.coffee', 'src/**/*.coffee']
        tasks: ['coffee:src', 'string-replace', 'browserify', 'concat']
      coffee_test:
        files: ['tests/mocha/**/*.coffee']
        tasks: ['coffee:test']
      jade:
        files: ['demo/*.jade', 'tests/**/*.jade', '!demo/content.jade']
        tasks: ['jade']
      stylus:
        files: ['demo/styles/*.styl', 'tests/mocha/*.styl']
        tasks: ['stylus']


  grunt.event.on('watch', (action, filepath) ->
    if grunt.file.isMatch(grunt.config('watch.coffee_demo.files'), filepath)
      grunt.config('coffee.demo.src', filepath)
    else if grunt.file.isMatch(grunt.config('watch.coffee_src.files'), filepath)
      grunt.config('coffee.src.src', filepath)
    else if grunt.file.isMatch(grunt.config('watch.jade.files'), filepath)
      grunt.config('jade.all.src', filepath)
    else if grunt.file.isMatch(grunt.config('watch.stylus.files'), filepath)
      grunt.config('stylus.all.src', filepath)
  )

  # Default task.
