Skip to content

Instantly share code, notes, and snippets.

@isGabe
Last active December 28, 2015 15:09
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 isGabe/7520154 to your computer and use it in GitHub Desktop.
Save isGabe/7520154 to your computer and use it in GitHub Desktop.
Grunt Setup #snippet
module.exports = function(grunt) {
grunt.initConfig({
grunticon: {
myIcons: {
options: {
src: "icons-svg",
dest: "icons-exp",
datasvgcss: "icon-svg.scss",
datapngcss: "icon-png.scss",
urlpngcss: "icon-urls.scss"
}
}
},
compass: {
dist: {
options: {
sassDir: '../scss',
cssDir: '../css',
imagesDir: '../images',
environment: 'production',
outputStyle: 'compressed',
relativeAssets: true,
noLineComments: true
}
}
},
concat: {
separator: ';',
dist: {
src: ['../js/libs/jquery.flexslider.js','../js/libs/jquery.waypoints.js','../js/libs/jquery.waypoints-sticky.js','../js/libs/jquery.organictabs.js','../js/libs/jquery.reveal.js','../js/scripts.js'],
dest: '../js/scripts.js'
}
},
uglify: {
scripts: {
files: {
'../js/scripts.min.js' : '../js/scripts.js'
}
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['compass']
},
scripts: {
files: ['<%= concat.dist.src %>'],
tasks: ['concat']
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-grunticon');
grunt.registerTask('default', ['compass','concat','uglify']);
};
{
"name": "",
"version": "0.0.0",
"description": "",
"main": "Gruntfile.js",
"dependencies": {
"grunt": "~0.4.1"
},
"author": "FStop",
"devDependencies": {
"grunt-grunticon": "~0.3.3",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-watch": "~0.5.2",
"grunt-contrib-compass": "~0.5.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment