phantomjs.js 442 B

1234567891011
  1. module.exports = function(config,grunt) {
  2. 'use strict';
  3. grunt.registerTask('phantomjs', 'Copy phantomjs binary from node', function() {
  4. var m=grunt.file.read("./node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/location.js")
  5. var p=/= \"([^\"]*)\"/.exec(m);
  6. if (grunt.file.exists(p[1])) {
  7. grunt.log.writeln('Using '+ p[1]);
  8. grunt.file.copy(p[1],'vendor/phantomjs/phantomjs');
  9. }
  10. });
  11. };