aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/install_old_jsdom.js
blob: 271e0cbe041308f9f8c422965410ae757390a2c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module.exports = function( grunt ) {

	"use strict";

	// Run this task to run jsdom-related tests on Node.js < 1.0.0.
	grunt.registerTask( "old_jsdom", function() {
		if ( !/^v0/.test( process.version ) ) {
			console.warn( "The old_jsdom task doesn\'t need to be run in io.js or new Node.js" );
			return;
		}

		// Use npm on the command-line
		// There is no local npm
		grunt.util.spawn( {
			cmd: "npm",
			args: [ "install", "jsdom@3" ],
			opts: { stdio: "inherit" }
		}, this.async() );
	} );
};