This file contains hidden or 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
/* | |
Cache breaker | |
Simple cache-breaker, appends a timestamp or md5 hash to any urls | |
https://www.npmjs.com/package/grunt-cache-breaker | |
*/ | |
'cachebreaker': { | |
dev: { | |
options: { | |
match: ['main.min.js', 'main.css'], | |
}, |
This file contains hidden or 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
/* | |
Sass | |
Compile Sass to CSS | |
https://www.npmjs.com/package/grunt-contrib-sass | |
*/ | |
'sass': { | |
dist: { | |
options: { | |
style: 'compressed' | |
}, |
This file contains hidden or 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
/* | |
HTML Min | |
Minify HTML | |
https://github.com/gruntjs/grunt-contrib-htmlmin | |
*/ | |
'htmlmin': { | |
dist: { | |
options: { | |
removeComments: true, | |
collapseWhitespace: true |
This file contains hidden or 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
/* | |
Process HTML | |
Process html files at build time to modify them depending on the release environment | |
https://www.npmjs.com/package/grunt-processhtml | |
*/ | |
'processhtml': { | |
dist: { | |
files: { | |
'<%= config.tmp %>/index.html': ['<%= config.dev %>/index.html'] | |
} |
This file contains hidden or 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
/* | |
Uglify | |
Minify files with UglifyJS | |
https://github.com/gruntjs/grunt-contrib-uglify | |
*/ | |
'uglify': { | |
my_target: { | |
files: { | |
'<%= config.dist %>/assets/js/main.min.js': | |
[ |
This file contains hidden or 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
/* | |
Copy | |
Copy files and folders. | |
https://github.com/gruntjs/grunt-contrib-copy | |
*/ | |
'copy': { | |
main: { | |
files: [ | |
{ | |
'expand': true, |
This file contains hidden or 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
/* | |
Clean | |
Clear files and folders | |
https://github.com/gruntjs/grunt-contrib-clean | |
*/ | |
'clean': ['<%= config.dist %>', '<%= config.tmp %>'], |
This file contains hidden or 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
/* | |
JSHint | |
Validate files with JSHint | |
https://github.com/gruntjs/grunt-contrib-jshint | |
*/ | |
'jshint': { | |
options: { | |
jshintrc: true | |
}, | |
all: ['Gruntfile.js', '<%= config.dev %>/assets/js/main.js'] |
This file contains hidden or 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
/* | |
Sass | |
Compile Sass to CSS | |
https://www.npmjs.com/package/grunt-contrib-sass | |
*/ | |
'sass': { | |
dev: { | |
options: { | |
style: 'expanded' | |
}, |
This file contains hidden or 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
/* | |
Watch | |
Run tasks whenever watched files change | |
https://www.npmjs.com/package/grunt-contrib-watch | |
*/ | |
'watch': { | |
css: { | |
files: '<%= config.dev %>/assets/scss/*.scss', | |
tasks: ['sass:dev'] | |
}, |