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
### | |
# Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
# These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
# | |
# Original gist by nhoizey: https://gist.github.com/nhoizey/4060568 | |
# | |
# Usage: | |
# $ casperjs screenshots.coffee [--atf] [--url=URL] | |
# with SlimerJS - it has better feature support than the default PhantomJS | |
# $ casperjs --engine=slimerjs test.coffee [--atf] [--url=URL] |
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) { | |
// most basic Grunt config with just livereloading | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
html: { | |
files: 'index.html', |
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
<!-- DEVELOPMENT --> | |
<script type="text/javascript" src="js/script.js" ></script> | |
<!-- END DEVELOPMENT --> | |
<!-- PRODUCTION | |
<script type="text/javascript" src="js/script.min.js"></script> | |
END PRODUCTION --> |
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({ | |
// (...) | |
copy:{ | |
// (...) | |
options: { | |
process: function (content) { | |
content = content.replace(/<!-- DEVELOPMENT -->\s*.*\s*<!-- END DEVELOPMENT -->/g,''); | |
content = content.replace(/<!-- PRODUCTION\s*(.*)\s*END PRODUCTION -->/g, '$1'); | |
return content; |
NewerOlder