Skip to content

Instantly share code, notes, and snippets.

@oknoway
Created August 16, 2013 00:40
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 oknoway/6246282 to your computer and use it in GitHub Desktop.
Save oknoway/6246282 to your computer and use it in GitHub Desktop.
{
"name": "Nutcase",
"version": "0.0.2",
"dependencies": {
"modernizr": "~2.6.2",
"flexslider": "",
"isotope": "~1.5.25",
"matter": "substancedev/matter#0.0.3",
"selectivizr": "~1.0.2"
},
"ignore": [
"node_modules",
"components",
"lib"
],
"exportsOverride": {
"flexslider": {
"js": "jquery.flexslider.js",
"scss": "flexslider.css"
},
"isotope": {
"js": "jquery.isotope.js"
},
"selectivizr": {
"js": "selectivizr.js"
},
"modernizr": {
"js": "modernizr.js"
}
}
}
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dirs: {
bower: './bower_components',
lib: './lib',
scss: './scss',
js: './js'
},
notify: {
watch: {
options: {
title: 'Done Grunting!',
message: 'SASS complete.'
}
}
},
bower: {
install: {
options: {
cleanup: false,
copy: true,
install: true,
layout: 'byType',
targetDir: '<%= dirs.lib %>',
verbose: true
}
}
},
rename: {
scss: {
src: '<%= dirs.lib %>/scss/flexslider/flexslider.css',
dest: '<%= dirs.scss %>/flexslider.scss'
}
},
concat: {
libs: {
files: {
'<%= dirs.js %>/head.lib.js' : [ '<%= dirs.lib %>/js/modernizr/modernizr.js','<%= dirs.lib %>/js/selectivizr/selectivizr.js' ],
'<%= dirs.js %>/script.lib.js' : [ '<%= dirs.lib %>/js/flexslider/jquery.flexslider.js','<%= dirs.lib %>/js/isotope/jquery.isotope.js' ]
}
},
script: {
files: {
'<%= dirs.js %>/script.dev.js' : [ '<%= dirs.js %>/script.lib.js','<%= dirs.js %>/script.js' ]
}
},
head: {
files: {
'<%= dirs.js %>/head.dev.js' : [ '<%= dirs.js %>/head.lib.js','<%= dirs.js %>/head.js' ]
}
}
},
uglify: {
head: {
files: {
'<%= dirs.js %>/head.min.js' : [ '<%= dirs.js %>/head.dev.js' ]
}
},
script: {
files: {
'<%= dirs.js %>/script.min.js' : [ '<%= dirs.js %>/script.dev.js' ]
}
}
},
sass: {
options: {
trace: true,
compass: false,
loadPath: [
'<%= dirs.lib %>/matter/'
]
},
dist: {
options: {
style: 'compressed'
},
files: {
'./style.css' : '<%= dirs.scss %>/style.scss',
'./style-admin.css' : '<%= dirs.scss %>/admin.scss'
}
},
dev: {
options: {
style: 'expanded'
},
files: {
'./style.css' : '<%= dirs.scss %>/style.scss',
'./style-admin.css' : '<%= dirs.scss %>/admin.scss'
}
}
},
watch: {
options: {
livereload: true
},
scss: {
files: '<%= dirs.scss %>/*',
tasks: [ 'sass:dev' ]
},
head: {
files: [ '<%= dirs.js %>/head.js' ],
tasks: [ 'concat:head' ]
},
script: {
files: [ '<%= dirs.js %>/script.js' ],
tasks: [ 'concat:script' ]
},
libs: {
files: [ '<%= dirs.js %>/*.lib.js' ],
tasks: [ 'concat:libs' ]
},
uglify: {
files: '<%= dirs.js %>/*.dev.js',
tasks: [ 'uglify' ]
}
}
});
grunt.loadNpmTasks( 'grunt-bower-task' );
grunt.loadNpmTasks( 'grunt-rename' );
grunt.loadNpmTasks( 'grunt-contrib-sass' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-notify' );
grunt.registerTask( 'default', [ 'build', 'watch' ] );
grunt.registerTask( 'build', [ 'bower', 'rename', 'concat', 'sass:dev', 'uglify' ] );
grunt.registerTask( 'prod', [ 'sass:dist', 'uglify' ] );
};
{
"name": "nutcase",
"version": "0.0.2",
"homepage": "http://nutcasehelmets.com",
"author": {
"name": "SubstanceDev",
"email": "dev@findsubstance.com"
},
"contributors": [
{
"name": "Nate Bedortha",
"url": "https://github.com/oknoway"
}
],
"repository": {
"type": "git",
"url": "git://github.com/substancedev/nutcase.git"
},
"bugs": {
"url": "https://github.com/substancedev/nutcase/issues"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-sass": "~0.4.1",
"grunt-contrib-watch": "~0.5.1",
"grunt-notify": "~0.2.7",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.2",
"grunt-bower-task": "~0.3.1",
"grunt-rename": "~0.1.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment