Skip to content

Instantly share code, notes, and snippets.

@skuenzli
Created August 19, 2015 05:11
Show Gist options
  • Save skuenzli/f0c4ed6f08f735cd319f to your computer and use it in GitHub Desktop.
Save skuenzli/f0c4ed6f08f735cd319f to your computer and use it in GitHub Desktop.
grunt-based sitespeed.io task
kermit:iteratephx.github.io(frontend-perfmatters) skuenzli$ grunt sitespeed
Running "sitespeedio:default" (sitespeedio) task
info: OS: 'darwin 14.3.0', Node.js: 'v0.10.23', sitespeed.io: '3.8.1', PhantomJS: '1.9.8', java: '1.7.0_67', browsertime: '0.10.2'
info: Will analyze 1 page
info: Running YSlow for http://localhost:8000 [phantomjs]
verbose: Done processing url in yslow: http://localhost:8000
info: Done analyzing urls
info: Wrote file errors.html
info: Wrote file hotlist.html
info: Wrote file index.html
info: Wrote file assets.html
info: Wrote file pages.html
info: Wrote file localhost.html
info: Wrote file rules.html
info: Wrote file detailed-site-summary.html
info: Wrote results to /Users/skuenzli/dev/dev.weblog-ng/iteratephx.github.io/sitespeed.out/localhost/2015-08-18-22-09-02
info: The analyze took a few seconds (9 seconds)
Done, without errors.
module.exports = function (grunt) {
grunt.initConfig({
sitespeedio: {
default: {
options: {
urls: ['http://localhost:8000'],
deepth: 1,
connection: 'cable',
resultBaseDir: 'sitespeed.out',
verbose: true
}
}
}
});
grunt.loadNpmTasks('grunt-sitespeedio');
grunt.registerTask('sitespeed', ['sitespeedio']);
};
{
"name": "frontend-perfmatters",
"version": "0.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"gulp-exit": "~0.0.2",
"ngrok": "~0.1.99",
"run-sequence": "~1.1.2",
"psi": "~1.0.6"
},
"devDependencies": {
"gulp-exit": "0.0.2",
"run-sequence": "~1.1.2",
"psi": "~1.0.6",
"ngrok": "~0.1.99",
"gulp": "~3.9.0",
"gulp-util": "~3.0.6",
"grunt": "~0.4.5",
"grunt-sitespeedio": "~0.8.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "BSD-2-Clause"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment