Permalink
Browse files

updating to grunt 0.3.9

  • Loading branch information...
1 parent 4dc58bc commit 61c9012cf99d3f99aef23fdb57b6b4898b8a0410 Sam Breed committed May 12, 2012
Showing with 105 additions and 94 deletions.
  1. +22 −0 LICENSE-MIT
  2. +0 −41 build/config.js
  3. +0 −15 build/index.js
  4. +0 −26 build/tasks/clean/clean.js
  5. +58 −0 grunt.js
  6. +25 −12 package.json
View
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Sam Breed
+
+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.
View
@@ -1,41 +0,0 @@
-config.init({
-
- lint: {
- files: ["lib/*"]
- },
-
- jshint: {
- options: {
- curly: true,
- eqeqeq: true,
- newcap: true,
- noarg: true,
- sub: true,
- undef: true,
- eqnull: true,
- browser: true,
- node: true
- },
- globals: {
- jQuery: true,
- ender: true
- }
- },
-
- min: {
- "dist/underscore.deferred.js": ["lib/underscore.deferred.js"]
- },
-
- qunit: {
- files: ["test/**/*.html"]
- },
-
- clean: {
- folder: "dist"
- }
-
-});
-
-// Run the following tasks...
-task.registerTask("default", "lint min");
-task.registerTask("test", "qunit min lint");
View
@@ -1,15 +0,0 @@
-var fs = require("fs");
-var grunt = require("grunt");
-
-// Auto-load tasks
-var taskList = fs.readdirSync(__dirname + "/tasks").filter(function(task) {
- return fs.statSync(__dirname + "/tasks/" + task).isDirectory();
-}).map(function(task) {
- return "build/tasks/" + task;
-}).concat("build/tasks");
-
-grunt.cli({
- base: "./",
- config: "build/config.js",
- tasks: taskList
-}, function() { });
View
@@ -1,26 +0,0 @@
-/*
- * Grunt Task File
- * ---------------
- *
- * Task: Clean
- * Description: Remove the contents of a given folder
- * Dependencies: rimraf
- *
- */
-
-task.registerBasicTask("clean", "Remove the contents of a given folder", function(data, name) {
- var folder = require("path").resolve(data);
-
- // Delete all files inside the folder
- task.helper("clean", folder);
-
- // Fail task if errors were logged.
- if (task.hadErrors()) { return false; }
-
- // Otherwise, print a success message.
- log.writeln("Folder \"" + folder + "\" contents removed.");
-});
-
-task.registerHelper("clean", function(folder) {
- require("rimraf").sync(folder);
-});
View
@@ -0,0 +1,58 @@
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: '<json:package.json>',
+ meta: {
+ banner: '/*! <%= 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(", ") %> */'
+ },
+ concat: {
+ dist: {
+ src: ['<banner:meta.banner>', '<file_strip_banner:lib/<%= pkg.name %>.js>'],
+ dest: 'dist/<%= pkg.name %>.js'
+ }
+ },
+ min: {
+ dist: {
+ src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
+ dest: 'dist/<%= pkg.name %>.min.js'
+ }
+ },
+ qunit: {
+ files: ['test/*.html']
+ },
+ lint: {
+ files: ['grunt.js', 'lib/underscore.deferred.js']
+ },
+ watch: {
+ files: '<config:lint.files>',
+ tasks: 'lint test'
+ },
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true
+ },
+ globals: {
+ exports: true,
+ module: false
+ }
+ },
+ uglify: {}
+ });
+
+ // Default task.
+ grunt.registerTask('default', 'lint qunit concat min');
+
+};
View
@@ -1,25 +1,38 @@
{
- "author": "wookiehangover <sam@quickleft.com> (http://quickleft.com)",
- "name": "underscore.deferred",
- "description": "Underscore style Deferreds",
- "version": "0.1.2",
+ "name": "underscore.Deferred",
+ "description": "jQuery style Deferreds",
+ "version": "0.1.3",
"homepage": "https://github.com/wookiehangover/underscore.Deferred",
+ "author": {
+ "name": "Sam Breed",
+ "email": "sam@quickleft.com"
+ },
"repository": {
"type": "git",
"url": "git://github.com/wookiehangover/underscore.Deferred.git"
},
- "main": "lib/underscore.deferred.js",
- "ender": "lib/ender.js",
+ "bugs": {
+ "url": "https://github.com/wookiehangover/underscore.Deferred/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/wookiehangover/underscore.Deferred/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/underscore.deferred",
"engines": {
- "node": "~v0.6.0"
+ "node": "*"
+ },
+ "scripts": {
+ "test": "grunt qunit"
},
"dependencies": {},
"devDependencies": {
- "grunt": "~0.2.15",
+ "grunt": "~0.3.9",
"rimraf": "~2.0.1",
- "underscore": "*"
+ "underscore": "*",
+ "mocha": "*"
},
- "scripts": {
- "test": "mocha -u qunit"
- }
+ "keywords": []
}

0 comments on commit 61c9012

Please sign in to comment.