Last active
December 16, 2015 18:59
-
-
Save cburgdorf/5481792 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
seo: { | |
site: 'index.html' | |
} | |
}); | |
grunt.loadTasks('grunt-contrib-seo/tasks'); | |
grunt.registerTask('default', ['seo']); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var url = phantom.args[1]; | |
var page = require('webpage').create(); | |
var url = 'http://www.phantomjs.org/'; | |
page.open(url, function (status) { | |
//grunt.log.write('wohooo page loaded'); | |
//Page is loaded! | |
phantom.exit(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* grunt-contrib-seo | |
* | |
* Copyright (c) 2013 Christoph Burgdorf, contributors | |
* Licensed under the MIT license. | |
*/ | |
'use strict'; | |
module.exports = function(grunt) { | |
var fs = require("fs"), | |
path = require("path"), | |
phantom = require("grunt-lib-phantomjs").init(grunt); | |
grunt.registerMultiTask('seo','fetch html snapshots', function(){ | |
debugger; | |
phantom.spawn('index.html', { | |
// Additional PhantomJS options. | |
options: { | |
phantomScript: "main.js" | |
}, | |
// Complete the task when done. | |
done: function (err) { | |
grunt.log.write('wohooo done'); | |
} | |
}); | |
grunt.log.write('wohooo'); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment