Skip to content

Commit

Permalink
Update grunt settings
Browse files Browse the repository at this point in the history
  • Loading branch information
loopj committed Sep 24, 2012
1 parent 60fce14 commit 23eeb09
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 337 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
*.zip
6 changes: 4 additions & 2 deletions demo.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="simple-slider.js"></script>
<script src="src/simple-slider.js"></script>
</head>

<body>
Expand Down Expand Up @@ -72,7 +72,9 @@ <h2>Predefined List, Equal Steps &amp; Snap</h2>
}


/* Stuff to render this page nicely */


/* Styles below are just to render this page, not needed for the slider */
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
Expand Down
71 changes: 44 additions & 27 deletions grunt.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,67 @@
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg : '<json:package.json>',

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

meta: {
banner:
'/*\n' +
' * <%= pkg.title || pkg.name %>: <%= pkg.description %>\n' +
' * Version <%= pkg.version %>\n' +
' *\n' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %> (<%= pkg.author.url %>)\n' +
' *\n' +
' * Licensed under the <%= pkg.licenses[0].type %> license (<%= pkg.licenses[0].url %>)\n' +
' *\n' +
' */\n'
},

coffee : {
plugin : {
src : 'src/*.coffee',
dest : 'src'
coffee: {
compile: {
files: {
'src/<%= pkg.name %>.js': 'src/*.coffee'
},

options: {
bare: true
}
}
},

watch : {
coffee : {
files: ['<config:coffee.plugin.src>'],
watch: {
coffee: {
files: ['src/*.coffee'],
tasks: 'coffee growl:coffee'
}
},

growl : {
coffee : {
title : 'CoffeeScript',
message : 'Compiled successfully'
growl: {
coffee: {
title: 'CoffeeScript',
message: 'Compiled successfully'
}
},

min : {
dist : {
src : ['<banner:meta.banner>', 'src/<%= pkg.name %>.js'],
dest : 'src/<%= pkg.name %>.min.js'
min: {
dist: {
src: ['<banner:meta.banner>', 'src/<%= pkg.name %>.js'],
dest: 'src/<%= pkg.name %>.min.js'
}
},

compress: {
zip: {
files: {
"<%= pkg.name %>-<%= pkg.version %>.zip": ["src/**", "demo.html", "README.md"]
}
}
}
});

// Lib tasks.
grunt.loadNpmTasks('grunt-contrib');
grunt.loadNpmTasks('grunt-growl');
grunt.loadNpmTasks('grunt-coffee');

// Default task.
grunt.registerTask('default', 'growl coffee');
grunt.registerTask('default', 'coffee growl:coffee');
grunt.registerTask('serve', 'server watch');
};
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"name" : "simple-slider",
"title" : "jQuery Simple Slider",
"description" : "Unobtrusive Numerical Slider",
"version" : "1.0.0",
"homepage" : "http://loopj.com/jquery-simple-slider",
"keywords" : [],
"author" : {
"name" : "James Smith",
"email" : "james@loopj.com",
Expand All @@ -12,8 +14,6 @@
"type" : "git",
"url" : "https://github.com/loopj/jquery-simple-slider.git"
},
"description" : "",
"keywords": [],
"bugs" : {
"url" : "https://github.com/loopj/jquery-simple-slider/issues"
},
Expand All @@ -22,9 +22,9 @@
"url" : "http://mit-license.org/"
}],
"devDependencies" : {
"grunt" : "0.3.15",
"grunt-coffee" : "0.0.6",
"grunt-growl" : "0.1.2"
"grunt" : "0.3.x",
"grunt-contrib": "0.2.x",
"grunt-growl": "git://github.com/loopj/grunt-growl.git#master"
},
"scripts": {
"test": "grunt"
Expand Down
Loading

0 comments on commit 23eeb09

Please sign in to comment.