Skip to content

Instantly share code, notes, and snippets.

@charliecm
Created November 24, 2014 04:23
Show Gist options
  • Save charliecm/6d1af20ac1603bb39bf6 to your computer and use it in GitHub Desktop.
Save charliecm/6d1af20ac1603bb39bf6 to your computer and use it in GitHub Desktop.
Gruntfile from font-icons-workflow.
module.exports = function(grunt) {
grunt.initConfig({
shell: {
exportIcons: {
command: 'sketchtool export slices assets/icons.sketch --output=assets/icons/'
}
},
webfont: {
icons: {
src: 'assets/icons/*.svg',
dest: 'src/fonts/',
destCss: 'src/css/',
options: {
font: 'icons',
fontHeight: 96,
normalize: false,
ascent: 84,
descent: 12,
destHtml: 'assets/',
templateOptions: {
classPrefix: 'icon-'
}
}
}
}
});
grunt.loadNpmTasks('grunt-webfont');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('default', [ 'shell:exportIcons', 'webfont:icons' ]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment