Skip to content

Commit

Permalink
updated grunt to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
torifat committed Jun 24, 2013
1 parent 9432232 commit c0d176e
Show file tree
Hide file tree
Showing 10 changed files with 317 additions and 262 deletions.
21 changes: 21 additions & 0 deletions .jshintrc
@@ -0,0 +1,21 @@
{
"curly": true,
"eqeqeq": true,
"immed": false,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"browser": true,
"globals": {
"jQuery": true,
"Backbone": true,
"_": true,
"$": true,
"slice": true,
"throwError": true
}
}
77 changes: 77 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,77 @@
/*global module:false*/
module.exports = function(grunt) {

// Load Grunt tasks declared in the package.json file
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
version: '<%= pkg.version %>',
banner: '// Backbone.Picky, v<%= meta.version %>\n' +
'// Copyright (c)<%= grunt.template.today("yyyy") %> Derick Bailey, Muted Solutions, LLC.\n' +
'// Distributed under MIT license\n' +
'// http://github.com/derickbailey/backbone.picky\n' +
'\n'
},

preprocess: {
// Currently works as a copy
build: {
files: {
'lib/backbone.picky.js' : 'src/backbone.picky.js'
}
},
amd: {
files: {
'lib/amd/backbone.picky.js' : 'src/amd.js'
}
}
},

concat: {
options: {
banner: "<%= meta.banner %>"
},
build: {
src: 'lib/backbone.picky.js',
dest: 'lib/backbone.picky.js'
},
amd_banner: {
src: 'lib/amd/backbone.picky.js',
dest: 'lib/amd/backbone.picky.js'
}
},

jshint: {
options: {
jshintrc : '.jshintrc'
},
picky : [ 'src/backbone.picky.js' ]
},

uglify : {
options: {
banner: "<%= meta.banner %>"
},
amd : {
src : 'lib/amd/backbone.picky.js',
dest : 'lib/amd/backbone.picky.min.js',
},
core : {
src : 'lib/backbone.picky.js',
dest : 'lib/backbone.picky.min.js',
options : {
sourceMap : 'lib/backbone.picky.map',
sourceMappingURL : 'backbone.picky.map',
sourceMapPrefix : 1
}
}
},
});

// Default task.
grunt.registerTask('default', ['jshint', 'preprocess', 'concat', 'uglify']);

};
68 changes: 0 additions & 68 deletions grunt.js

This file was deleted.

0 comments on commit c0d176e

Please sign in to comment.