Browse Source

remove test_runner.js if tests run without error

Manfred Kroehnert 10 years ago
parent
commit
6112990e96
2 changed files with 8 additions and 2 deletions
  1. 6 1
      Gruntfile.js
  2. 2 1
      package.json

+ 6 - 1
Gruntfile.js

@@ -4,10 +4,11 @@ module.exports = function(grunt) {
   grunt.loadNpmTasks('amber-dev');
 
   grunt.loadNpmTasks('grunt-contrib-jshint');
+  grunt.loadNpmTasks('grunt-contrib-clean');
   grunt.loadNpmTasks('grunt-execute');
 
   grunt.registerTask('default', ['peg', 'amberc:all']);
-  grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner_run']);
+  grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner_run', 'clean:test_runner_clean']);
 
   grunt.initConfig({
     pkg: grunt.file.readJSON('package.json'),
@@ -87,6 +88,10 @@ module.exports = function(grunt) {
       }
     },
 
+    clean: {
+      test_runner_clean: ['test_runner.js']
+    },
+
     jshint: {
       amber: ['src/*.js'],
       server: ['server/*.js'],

+ 2 - 1
package.json

@@ -33,6 +33,7 @@
     "grunt": "~0.4.0",
     "grunt-contrib-jshint": "~0.3.0",
     "grunt-execute": "~0.2.1",
-    "amber-dev": "0.0.3"
+    "amber-dev": "0.0.3",
+    "grunt-contrib-clean": "~0.5.0"
   }
 }