diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 8ff6edb75..56d41fe2e 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -145,6 +145,20 @@ module.exports = (grunt) -> _.extend(context, parsed.attributes) parsed.body + shell: + 'kill-atom': + command: 'pkill Atom' + options: + stdout: false + stderr: false + failOnError: false + + test: + command: "#{path.join(contentsDir, 'MacOS', 'Atom')} --test --resource-path=#{__dirname}" + options: + stdout: false + stderr: false + callback: (error, stdout, stderr) -> grunt.warn('Specs failed') grunt.loadNpmTasks('grunt-coffeelint') grunt.loadNpmTasks('grunt-lesslint') @@ -153,10 +167,12 @@ module.exports = (grunt) -> grunt.loadNpmTasks('grunt-contrib-coffee') grunt.loadNpmTasks('grunt-contrib-less') grunt.loadNpmTasks('grunt-markdown') + grunt.loadNpmTasks('grunt-shell') grunt.loadTasks('tasks') grunt.registerTask('compile', ['coffee', 'less', 'cson']) grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint']) + grunt.registerTask('test', ['shell:kill-atom', 'shell:test']) grunt.registerTask('ci', ['lint', 'partial-clean', 'update-atom-shell', 'build', 'set-development-version', 'test']) grunt.registerTask('deploy', ['partial-clean', 'update-atom-shell', 'build', 'codesign']) grunt.registerTask('docs', ['markdown:guides', 'build-docs']) diff --git a/package.json b/package.json index a30682e81..ecdda85e2 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "tantamount": "0.3.0", "temp": "0.5.0", "underscore": "1.4.4", - "archive-view": "0.3.0", "autocomplete": "0.3.0", "autoflow": "0.1.0", @@ -67,7 +66,6 @@ "tree-view": "0.2.0", "whitespace": "0.1.0", "wrap-guide": "0.1.0", - "c-tmbundle": "1.0.0", "coffee-script-tmbundle": "4.0.0", "css-tmbundle": "1.0.0", @@ -115,7 +113,8 @@ "ws": "0.4.27", "js-yaml": "~2.1.0", "grunt-markdown": "~0.4.0", - "json-front-matter": "~0.1.3" + "json-front-matter": "~0.1.3", + "grunt-shell": "~0.3.1" }, "private": true, "scripts": { diff --git a/tasks/test-task.coffee b/tasks/test-task.coffee deleted file mode 100644 index 0b6f47c00..000000000 --- a/tasks/test-task.coffee +++ /dev/null @@ -1,15 +0,0 @@ -path = require 'path' - -module.exports = (grunt) -> - {spawn} = require('./task-helpers')(grunt) - - grunt.registerTask 'test', 'Run the specs', -> - done = @async() - commands = [] - commands.push (callback) -> - spawn cmd: 'pkill', args: ['Atom'], -> callback() - commands.push (callback) -> - atomBinary = path.join(grunt.config.get('atom.contentsDir'), 'MacOS', 'Atom') - resourcePath = path.resolve(__dirname, '..') - spawn cmd: atomBinary, args: ['--test', "--resource-path=#{resourcePath}"], (error) -> callback(error) - grunt.util.async.waterfall commands, (error) -> done(error)