Skip to content

Instantly share code, notes, and snippets.

@yatil
Created August 13, 2013 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yatil/6221554 to your computer and use it in GitHub Desktop.
Save yatil/6221554 to your computer and use it in GitHub Desktop.
/*global module:false*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
compass: {
dev: { // Target
options: { // Target options
sassDir: 'assets/sass',
cssDir: 'assets/css/dev',
fontsDir: '/assets/fonts',
outputStyle: 'nested',
noLineComments: false,
force: true,
relativeAssets: true
}
},
prod: { // Target
options: { // Target options
sassDir: 'assets/sass',
cssDir: 'assets/css',
fontsDir: '/assets/fonts',
outputStyle: 'compressed',
noLineComments: true,
force: true,
relativeAssets: true
}
}
},
webfont: {
iconsdev: {
src: 'assets/icons/*.svg',
dest: 'assets/iconfont/dev',
destCSS: 'assets/iconfont/dev',
options: {
stylesheet: 'css',
relativeFontPath: '../iconfont/dev'
}
},
iconsprod: {
src: 'assets/icons/*.svg',
dest: 'assets/iconfont',
destCSS: 'assets/scss',
options: {
stylesheet: 'scss',
relativeFontPath: '../iconfont'
}
}
},
watch : {
css: {
files: 'assets/sass/*.scss',
tasks: ['compass'],
options: {
nospawn: true
}
},
icons: {
files: 'assets/icons/*.svg',
tasks: ['webfont'],
options: {
nospawn: true
}
}
},
'bower-install': {
target: {
// Point to the html file that should be updated
// when you run `grunt bower-install`
html: 'test.html'
}
}
});
// Default task
grunt.registerTask('default', 'watch');
grunt.registerTask('dev', 'compass:dev');
//grunt.registerTask('prod', 'compass:prod');
// Compass tasks
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-webfont');
grunt.loadNpmTasks('grunt-bower-install');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment