Skip to content

Commit

Permalink
Initial work on using grunt to code-generate dist
Browse files Browse the repository at this point in the history
  • Loading branch information
auchenberg committed Jul 4, 2012
1 parent 8a95226 commit 007aeb3
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
File renamed without changes.
66 changes: 66 additions & 0 deletions grunt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*global module:false*/
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*\n' +
' * <%= pkg.title || pkg.name %>\n' +
' * Version <%= pkg.version %>' +
'\n' +
' * Relased: <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' *\n' +
' * <%= pkg.homepage + "\n" %>' +
' *\n' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
' *\n' +
' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>' +
'\n' +
' */'
},

concat: {
dist: {
src: ['<banner:meta.banner>', '<file_strip_banner:src/<%= pkg.name %>.js>'],
dest: 'dist/<%= pkg.name %>.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/<%= pkg.name %>.min.js'
}
},
lint: {
files: ['grunt.js', 'src/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'lint qunit'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
browser: true
},
globals: {
jQuery: true
}
},
uglify: {}
});

// Default task.
grunt.registerTask('default', 'lint qunit concat min');

};
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "jquery.mentionsInput",
"title": "jquery.mentionsInput",
"description": "jquery.mentionsInput is a small, but awesome UI component that allows you to '@mention' someone in a text message.",
"version": "1.5",
"homepage": "http://podio.github.com/jquery-mentions-input/",
"author": {
"name": "Kenneth Auchenberg (Citrix Systems Inc)",
"url": "http://podio.com/"
},
"repository": {
"type": "git",
"url": "https://github.com/podio/jquery-mentions-input.git"
},
"bugs": {
"url": "https://github.com/podio/jquery-mentions-input/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/cowboy/grunt-jquery-example/blob/master/LICENSE-MIT"
}
],
"dependencies": {
"jquery": "~1.5",
"underscorejs" : "~1.5"
},
"keywords": []
}
File renamed without changes.

0 comments on commit 007aeb3

Please sign in to comment.