Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tyler Kellen
committed
Oct 5, 2012
0 parents
commit 733348d
Showing
13 changed files
with
441 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
npm-debug.log | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"sub": true, | ||
"undef": true, | ||
"boss": true, | ||
"eqnull": true, | ||
"node": true, | ||
"es5": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"Cowboy" Ben Alman (http://benalman.com) | ||
Tyler Kellen (http://goingslowly.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
v0.1.0: | ||
date: 2012-10-05 | ||
changes: | ||
- Work in progress, not yet officially released. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
[Grunt homepage](http://gruntjs.com/) | [Documentation table of contents](https://github.com/gruntjs/grunt/blob/devel/docs/toc.md) | ||
|
||
# Contributing to grunt | ||
|
||
There are a number of grunt projects. | ||
|
||
* [grunt](https://github.com/gruntjs/grunt) - the main grunt project | ||
* [gruntjs.com](https://github.com/gruntjs/gruntjs.com) - the gruntjs.com website | ||
* [grunt-contrib collection](https://github.com/gruntjs/grunt-contrib) - a collection of all grunt "contrib" plugins | ||
|
||
In addition, each individual grunt-contrib plugin is a separate repository listed on the [gruntjs org homepage](https://github.com/gruntjs). | ||
|
||
## Filing issues | ||
If something isn't working like you think it should, please read the documentation first. If you'd like to chat with someone, [pop into IRC](#discussing-grunt) and ask your question there. | ||
|
||
The best way to ensure an issue gets addressed is to file it in the appropriate issues tracker. | ||
|
||
**If there's an issue with a specific grunt-contrib plugin:** | ||
Please file an issue on that plugin's issues tracker. | ||
|
||
**If you'd like to contribute a new plugin:** | ||
Please file an issue on the [grunt-contrib collection issues tracker](https://github.com/gruntjs/grunt-contrib/issues). We don't accept all plugins, but we'll certainly consider yours. | ||
|
||
**If there's an issue with the [website](http://gruntjs.com/):** | ||
Please file an issue on the [gruntjs.com website issues tracker](https://github.com/gruntjs/gruntjs.com/issues). | ||
|
||
**If there's an issue that isn't specific to any of the above:** | ||
Please file an issue on the [grunt issues tracker](https://github.com/gruntjs/grunt/issues). | ||
|
||
### Simplify the issue | ||
Try to [reduce your code](http://www.webkit.org/quality/reduction.html) to the bare minimum required to reproduce the issue. This makes it much easier (and much faster) to isolate and fix the issue. | ||
|
||
### Explain the issue | ||
If we can't reproduce the issue, we can't fix it. Please list the exact steps required to reproduce the issue. Include versions of your OS, Node.js, grunt, etc. Include relevant logs or sample code. | ||
|
||
## Discussing grunt | ||
Join the [freenode](http://freenode.net/) IRC #grunt channel. We've got a bot and everything. | ||
|
||
_No private messages, please._ | ||
|
||
## Modifying grunt | ||
First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed. | ||
|
||
1. Fork and clone the repo. | ||
1. Check out the correct branch. Currently, grunt development happens in the `devel` branch. | ||
1. Run `npm install` to install all grunt dependencies. | ||
1. Run `npm link` to put the dev version of grunt in the system path (this is only needed for developing grunt, not for plugins or the website). | ||
1. Run `grunt` to grunt grunt. | ||
|
||
Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing breaks. | ||
|
||
### Submitting pull requests | ||
|
||
1. Create a new branch, please don't work in your `master` or `devel` branch directly. | ||
1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail. | ||
1. Fix stuff. | ||
1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done. | ||
1. Update the documentation to reflect any changes. | ||
1. Push to your fork and submit a pull request. | ||
|
||
### Syntax | ||
|
||
* Two space indents. Don't use tabs anywhere. Use `\t` if you need a tab character in a string. | ||
* No trailing whitespace, except in markdown files where a linebreak must be forced. | ||
* Don't go overboard with the whitespace. | ||
* No more than [one assignment](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) per `var` statement. | ||
* Delimit strings with single-quotes `'`, not double-quotes `"`. | ||
* Prefer `if` and `else` to ["clever"](http://programmers.stackexchange.com/a/25281) uses of `? :` conditional or `||`, `&&` logical operators. | ||
* Comments are great. Just put them _before_ the line of code, _not_ at the _end_ of the line. | ||
* **When in doubt, follow the conventions you see used in the source already.** | ||
|
||
### Reverting back to the "official" grunt | ||
If you've used `npm link` to put a dev version of grunt in the system path and, for some reason, need to revert back to the current official grunt release, just reinstall grunt globally with `npm install -g grunt` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* grunt-contrib-qunit | ||
* http://gruntjs.com/ | ||
* | ||
* Copyright (c) 2012 "Cowboy" Ben Alman, contributors | ||
* Licensed under the MIT license. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
jshint: { | ||
all: [ | ||
'Gruntfile.js', | ||
'tasks/**/*.js', | ||
], | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
|
||
}); | ||
|
||
// Actually load this plugin's task(s). | ||
grunt.loadTasks('tasks'); | ||
|
||
// These plugins provide necessary tasks. | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
|
||
// By default, lint task. | ||
grunt.registerTask('default', 'jshint'); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2012 "Cowboy" Ben Alman, contributors | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# grunt-contrib-qunit [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-contrib-qunit.png?branch=master)](http://travis-ci.org/gruntjs/grunt-contrib-qunit) (unreleased, for grunt v0.4.0a) | ||
|
||
> Run QUnit unit tests in a headless PhantomJS instance. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "grunt-contrib-qunit", | ||
"description": "Run QUnit unit tests in a headless PhantomJS instance.", | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-qunit", | ||
"author": { | ||
"name": "Grunt Team", | ||
"url": "http://gruntjs.com/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/gruntjs/grunt-contrib-qunit.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/gruntjs/grunt-contrib-qunit/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/gruntjs/grunt-contrib-qunit/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"main": "Gruntfile.js", | ||
"engines": { | ||
"node": ">= 0.6.0" | ||
}, | ||
"scripts": { | ||
"test": "grunt test" | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "0.1.0", | ||
"grunt-contrib-internal": "*", | ||
"grunt-lib-phantomjs": "0.1.0", | ||
"grunt": "~0.4.0a" | ||
}, | ||
"keywords": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* grunt-contrib-qunit | ||
* http://gruntjs.com/ | ||
* | ||
* Copyright (c) 2012 "Cowboy" Ben Alman, contributors | ||
* Licensed under the MIT license. | ||
*/ | ||
|
||
/*global QUnit:true, alert:true*/ | ||
|
||
'use strict'; | ||
|
||
// Don't re-order tests. | ||
QUnit.config.reorder = false; | ||
// Run tests serially, not in parallel. | ||
QUnit.config.autorun = false; | ||
|
||
// Send messages to the parent PhantomJS process via alert! Good times!! | ||
function sendMessage() { | ||
var args = [].slice.call(arguments); | ||
alert(JSON.stringify(args)); | ||
} | ||
|
||
// These methods connect QUnit to PhantomJS. | ||
QUnit.log = function(obj) { | ||
// What is this I don’t even | ||
if (obj.message === '[object Object], undefined:undefined') { return; } | ||
// Parse some stuff before sending it. | ||
var actual = QUnit.jsDump.parse(obj.actual); | ||
var expected = QUnit.jsDump.parse(obj.expected); | ||
// Send it. | ||
sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source); | ||
}; | ||
|
||
QUnit.testStart = function(obj) { | ||
sendMessage('qunit.testStart', obj.name); | ||
}; | ||
|
||
QUnit.testDone = function(obj) { | ||
sendMessage('qunit.testDone', obj.name, obj.failed, obj.passed, obj.total); | ||
}; | ||
|
||
QUnit.moduleStart = function(obj) { | ||
sendMessage('qunit.moduleStart', obj.name); | ||
}; | ||
|
||
QUnit.moduleDone = function(obj) { | ||
sendMessage('qunit.moduleDone', obj.name, obj.failed, obj.passed, obj.total); | ||
}; | ||
|
||
QUnit.begin = function() { | ||
sendMessage('qunit.begin'); | ||
}; | ||
|
||
QUnit.done = function(obj) { | ||
sendMessage('qunit.done', obj.failed, obj.passed, obj.total, obj.runtime); | ||
}; |
Oops, something went wrong.