 'use strict'
+
+fs = require 'fs'
 
 module.exports = (grunt)->
 

        grunt.task.run 'concurrent:servers'

    # build the project for development (skips minifying code)
    grunt.registerTask 'build-dev', ['coffeelint', 'browserify', 'less', 'clean:current', 'copy']

    # run end-to-end tests http://docs.angularjs.org/guide/dev_guide.e2e-testing
    grunt.registerTask 'e2e-test', ['clean:e2etests', 'coffee:e2etests', 'concurrent:e2e', 'clean:e2etests']

        copy: {
            # copy our latest build to
            # the corresponding current directory
            current:
                files: [
                    {
                        expand: yes
                        nonull: yes
                        cwd: '<%= app.build.path %>'
                        src: ['**/*.js', '**/*.css']
                        dest: '<%= app.build.current %>/'
                    }
                ]

            build:
                files: [
                    {
                        expand: yes
                        nonull: yes
                        cwd: '<%= app.build.dir%>/<%= timestamp %>'
                        src: ['**/*.js', '**/*.css']
                        dest: '<%= app.build.current %>/'
                    }
