Skip to content

Commit

Permalink
added grunt workflow for minification. added jquery plugin manifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
kylestetz committed Sep 14, 2013
1 parent e9af53a commit 75c3f7d
Show file tree
Hide file tree
Showing 7 changed files with 502 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
.DS_Store
39 changes: 39 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
full_src: {
options: {
beautify: true,
mangle: false,
banner: '/*! ~ CLNDR v<%= pkg.version %> ~ \n' +
' * ============================================== \n' +
' * https://github.com/kylestetz/CLNDR \n' +
' * ============================================== \n' +
' * created by kyle stetz (github.com/kylestetz) \n' +
' * &available under the MIT license \n' +
' * http://opensource.org/licenses/mit-license.php \n' +
' * ============================================== \n' +
' */\n'
},
files: {
'./<%= pkg.name %>.js': 'src/<%= pkg.name %>.js'
}
},
mini_src: {
options: {
banner: '/*! <%= pkg.name %>.min.js v<%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
files: {
'./<%= pkg.name %>.min.js': 'src/<%= pkg.name %>.js'
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-uglify');

grunt.registerTask('default', ['uglify']);

};
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)
---------------------

**Copyright (c) 2013 Kyle Stetz & P'unk Avenue LLC**

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
33 changes: 33 additions & 0 deletions clndr.jquery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "clndr",
"title": "CLNDR",
"description": "CLNDR is a calendar plugin that uses HTML templates, allowing you to write custom markup and styles that have access to useful calendar data.",
"keywords": ["calendar", "ui", "date", "punkave"],
"version": "1.0.0",
"author": {
"name": "Kyle Stetz",
"url": "http:/github.com/kylestetz"
},
"maintainers": [
{
"name": "Kyle Stetz",
"email": "[email protected]",
"url": "http:/punkave.com"
}
],
"licenses": [
{
"type": "MIT",
"url": "https://github.com/kylestetz/CLNDR/LICENSE.md"
}
],
"bugs": "https://github.com/kylestetz/CLNDR/issues",
"homepage": "https://kylestetz.github.io/CLNDR/",
"docs": "https://github.com/kylestetz/CLNDR",
"download": "https://github.com/kylestetz/CLNDR",
"dependencies": {
"jquery": ">=1.9",
"underscore": ">=1.4.4",
"moment": ">=2.0.0"
}
}
19 changes: 14 additions & 5 deletions example/site.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
$(document).ready( function() {

// here's some magic to make sure the dates are happening this month.
var thisMonth = moment().format('YYYY-MM');

// Here's our events array. We could grab this via AJAX as well.
var eventArray = [
{ date: "2013-07-24 07:52", title: "175 down, 190 to go", url: "http://google.com", time: "7:15PM" },
{ date: "2013-08-28", title: "August 28th Part 1", url: "http://www.google.com" },
{ date: "2013-08-28", title: "August 28th Part 2", arbitraryObject: 42 },
{ date: "2013-09-16", title: "Somebody's Birthday." }
{ date: thisMonth + "-24 07:52", title: "This is an event title", url: "http://google.com", time: "7:15PM" },
{ date: thisMonth + "-28", title: "the 28th, Part 1", url: "http://www.google.com" },
{ date: thisMonth + "-28", title: "the 28th, Part 2", arbitraryObject: 42 },
{ date: thisMonth + "-16", title: "Another title", anotherObject: "clndr exposes whatever is in your event object" }
];

var clndr1 = $('.cal1').clndr({
Expand All @@ -19,7 +23,12 @@ $(document).ready( function() {
var clndr2 = $('.cal2').clndr({
template: $('#template-calendar').html(),
events: eventArray,
startWithMonth: moment().add('month', 1)
startWithMonth: moment().add('month', 1),
clickEvents: {
click: function(target) {
console.log(target);
}
}
});

// bind both clndrs to the left and right arrow keys
Expand Down
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "clndr",
"version": "1.0.0",
"description": "Development environment for clndr.js",
"author": "Kyle Stetz",
"license": "MIT",
"devDependencies": {
"grunt": "*",
"grunt-contrib-uglify": "~0.2.4"
}
}
Loading

0 comments on commit 75c3f7d

Please sign in to comment.