Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Updating to Grunt 0.4 #1

Merged
merged 1 commit into from

3 participants

@mikesherov

No description provided.

@jaubourg
Owner

Just arrived at Phuket. Don't wanna hold jQuery because I'm out of town ;) I made you a collaborator. Just ping me if there is any problem.

@jaubourg
Owner

Silly me just realized I'll have to npm publish it anyway...

@mikesherov mikesherov merged commit a665cee into jaubourg:master
@mikesherov

@jaubourg, can you publish?

@ctalkington

also the bin file wont work anymore. as npmTasks was removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 15, 2012
  1. @mikesherov

    Updating to Grunt 0.4

    mikesherov authored
This page is out of date. Refresh to see the latest.
View
14 .jshintrc
@@ -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
+}
View
18 Gruntfile.js
@@ -0,0 +1,18 @@
+"use strict";
+
+module.exports = function(grunt) {
+
+ grunt.initConfig({
+ jshint: {
+ files: [ "Gruntfile.js", "tasks/**/*.js" ],
+ options: {
+ jshintrc: ".jshintrc"
+ }
+ }
+ });
+
+ // Default task.
+ grunt.registerTask("default", "jshint");
+ grunt.loadNpmTasks("grunt-contrib-jshint");
+ grunt.loadTasks("tasks");
+};
View
9 README.md
@@ -4,14 +4,15 @@ Updates git submodules
## Getting Started
-Install this grunt plugin with: `npm install -g grunt-update-submodules`
-
-Then add this to your project's `grunt.js` gruntfile:
-
+Add this to your project's `Gruntfile.js` gruntfile:
```javascript
task.loadNpmTasks('grunt-update-submodules');
```
+Then add "grunt-update-submodules" to your package.json dependencies.
+
+Then install the plugin with: `npm install`
+
The name to use in your own task definitions is `update_submodules` (with an underscore).
## License
View
32 grunt.js
@@ -1,32 +0,0 @@
-module.exports = function(grunt) {
-
-
-  // Project configuration.
-  grunt.initConfig({
-    pkg: "<json:package.json>",
-    lint: {
-      files: [ "grunt.js", "tasks/**/*.js" ]
-    },
-    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
-      },
-      globals: {}
-    }
-  });
-
-  // Default task.
-  grunt.registerTask("default", "lint");
-
-};
View
9 package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-update-submodules",
"description": "Updates git submodules",
- "version": "0.1.2",
+ "version": "0.2.0",
"homepage": "https://github.com/jaubourg/grunt-update-submodules",
"author": "Julian Aubourg <j@ubourg.net>",
"repository": {
@@ -17,16 +17,17 @@
"url": "https://github.com/jaubourg/grunt-update-submodules/blob/master/LICENSE-MIT"
}
],
- "main": "grunt.js",
+ "main": "Gruntfile.js",
"bin": "bin/grunt-update-submodules",
"engines": {
"node": "*"
},
"dependencies": {
- "grunt": "~0.3.5"
+ "grunt": "~0.4.0rc3"
},
"devDependencies": {
- "grunt": "~0.3.5"
+ "grunt": "~0.4.0rc3",
+ "grunt-contrib-jshint": "~0.1.0"
},
"keywords": [
"git",
View
10 tasks/update-submodules.js
@@ -1,8 +1,10 @@
+"use strict";
+
module.exports = function( grunt ) {
grunt.registerTask( "update_submodules", function() {
var done = this.async();
grunt.verbose.writeln( "Updating submodules..." );
- grunt.utils.spawn({
+ grunt.util.spawn({
cmd: "git",
args: [ "submodule" ]
}, function( error, result ) {
@@ -12,9 +14,9 @@ module.exports = function( grunt ) {
return;
}
var args = "submodule update --init --recursive" +
- ( /(?:^|\n)-/.test( result ) ? "" : " --merge" );
+ ( /(?:^|\n)-/.test( result.stdout ) ? "" : " --merge" );
grunt.verbose.writeln( "git " + args );
- grunt.utils.spawn({
+ grunt.util.spawn({
cmd: "git",
args: args.split(" ")
}, function( error ) {
@@ -26,5 +28,5 @@ module.exports = function( grunt ) {
done();
});
});
- });
+ });
};
Something went wrong with that request. Please try again.