Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.

Commit 4c6a5a5

Browse files
author
Rob Dodson
committed
Add PageSpeed Insights
1 parent 6c361e1 commit 4c6a5a5

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

app/templates/Gruntfile.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,26 @@ module.exports = function (grunt) {
275275
src: ['{styles,elements}/{,*/}*.css']
276276
}]
277277
}
278+
},
279+
// See this tutorial if you'd like to run PageSpeed
280+
// against localhost: http://www.jamescryer.com/2014/06/12/grunt-pagespeed-and-ngrok-locally-testing/
281+
pagespeed: {
282+
options: {
283+
// By default, we use the PageSpeed Insights
284+
// free (no API key) tier. You can use a Google
285+
// Developer API key if you have one. See
286+
// http://goo.gl/RkN0vE for info
287+
nokey: true
288+
},
289+
// Update `url` below to the public URL for your site
290+
mobile: {
291+
options: {
292+
url: "https://developers.google.com/web/fundamentals/",
293+
locale: "en_GB",
294+
strategy: "mobile",
295+
threshold: 80
296+
}
297+
}
278298
}
279299
});
280300

app/templates/_package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"grunt-contrib-jasmine": "~0.5.1",<% } else { %>
2020
"grunt-mocha": "~0.4.7",<% } %>
2121
"grunt-usemin": "~2.3.0",
22+
"grunt-pagespeed": "~0.3.0",
2223
"grunt-rev": "~0.1.0",
2324
"grunt-open": "~0.2.3",
2425
"grunt-vulcanize": "~0.3.0",

0 commit comments

Comments
 (0)