first commit

pull/9/head
Tyler Kellen 12 years ago
commit 44abe380e4

3
.gitignore vendored

@ -0,0 +1,3 @@
node_modules
npm-debug.log
tmp

@ -0,0 +1,2 @@
Ben Alman (http://benalman.com)
Kyle Robinson Young (http://dontkry.com)

@ -0,0 +1,22 @@
Copyright (c) 2012 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.

@ -0,0 +1,21 @@
# grunt-contrib-watch (not released)
> Your description here (part of the [grunt-contrib](https://github.com/gruntjs/grunt-contrib) collection). Submitted by [Sindre Sorhus](/sindresorhus).
## Getting Started
Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: `npm install grunt-contrib-watch`
Then add this line to your project's `grunt.js` gruntfile:
```javascript
grunt.loadNpmTasks('grunt-contrib-watch');
```
[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
### Overview
## Release History
* 2012/08/xx - v0.2.0 - notation

@ -0,0 +1,65 @@
/*
* grunt-contrib-watch
* http://gruntjs.com/
*
* Copyright (c) 2012 Sindre Sorhus, contributors
* Licensed under the MIT license.
* https://github.com/gruntjs/grunt-contrib-watch/blob/master/LICENSE-MIT
*/
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
lint: {
all: ['grunt.js', 'tasks/*.js', '<config:nodeunit.tasks>']
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true,
es5: true
}
},
// Before generating any new files, remove any previously-created files.
clean: {
test: ['tmp']
},
// Configuration to be run (and then tested).
watch: {
},
// Unit tests.
nodeunit: {
tasks: ['test/*_test.js']
}
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
// The clean plugin helps in testing.
grunt.loadNpmTasks('grunt-contrib-clean');
// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.renameTask('test', 'nodeunit');
grunt.registerTask('test', 'clean watch nodeunit');
// By default, lint and run all tests.
grunt.registerTask('default', 'lint test');
};

@ -0,0 +1,40 @@
{
"name": "grunt-contrib-watch",
"description": "Your description here.",
"version": "0.2.0",
"homepage": "https://github.com/gruntjs/grunt-contrib-watch",
"author": {
"name": "Ben Alman",
"url": "http://benalman.com"
},
"repository": {
"type": "git",
"url": "git://github.com/gruntjs/grunt-contrib-watch.git"
},
"bugs": {
"url": "https://github.com/gruntjs/grunt-contrib-watch/issues"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/gruntjs/grunt-contrib-watch/blob/master/LICENSE-MIT"
}
],
"main": "grunt.js",
"engines": {
"node": "*"
},
"scripts": {
"test": "grunt test"
},
"dependencies": {
"grunt-contrib-lib": "~0.2.0"
},
"devDependencies": {
"grunt": "~0.3.15",
"grunt-contrib-clean": "~0.2.0"
},
"keywords": [
"gruntplugin"
]
}

@ -0,0 +1,32 @@
/*
* grunt-contrib-watch
* http://gruntjs.com/
*
* Copyright (c) 2012 Ben Alman, contributors
* Licensed under the MIT license.
* https://github.com/gruntjs/grunt-contrib-watch/blob/master/LICENSE-MIT
*/
module.exports = function(grunt) {
'use strict';
// TODO: ditch this when grunt v0.4 is released
grunt.util = grunt.util || grunt.utils;
var _ = grunt.util._;
var helpers = require('grunt-contrib-lib').init(grunt);
grunt.registerMultiTask('watch', '', function() {
var helpers = require('grunt-contrib-lib').init(grunt);
var options = helpers.options(this, {namespace: 'JST'});
grunt.verbose.writeflags(options, 'Options');
// TODO: ditch this when grunt v0.4 is released
this.files = this.files || helpers.normalizeMultiTaskFiles(this.data, this.target);
});
};

@ -0,0 +1 @@
body{}

@ -0,0 +1,14 @@
var grunt = require('grunt');
exports.watch = {
compile: function(test) {
'use strict';
test.expect(1);
var actual = grunt.file.read('tmp/compile.css');
var expected = grunt.file.read('test/expected/compile.css');
test.equal(actual, expected, 'should compile watch to css using watch');
test.done();
}
};
Loading…
Cancel
Save