-
Notifications
You must be signed in to change notification settings - Fork 26
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
Hsiaoming Yang
committed
Mar 26, 2013
1 parent
7bd8982
commit d343a30
Showing
3 changed files
with
118 additions
and
13 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 |
---|---|---|
@@ -1,14 +1,34 @@ | ||
# grunt | ||
|
||
- pubdate: 2013-03-20 | ||
- pubdate: 2013-03-26 | ||
- index: 10 | ||
|
||
Hack the grunt. | ||
|
||
----- | ||
|
||
spm hacks in grunt, extends grunt methods. | ||
|
||
## invokeTask | ||
```js | ||
var grunt = require('spm').sdk.grunt; | ||
``` | ||
|
||
It contains everything of grunt, and more. | ||
|
||
## loadGlobalTasks | ||
## invokeTask(name, options) | ||
|
||
Invoke/call a task. | ||
|
||
```js | ||
grunt.invokeTask('build', { | ||
fallback: function(grunt) { | ||
console.log('fallback') | ||
} | ||
}) | ||
``` | ||
|
||
It will search the gruntfiles and detect if the task name in the gruntfile. If the task is in the gruntfile, it will run the task, if not, it will call the fallback function. | ||
|
||
## loadGlobalTasks(name) | ||
|
||
Load tasks in the global `NODE_PATH`. Just like `loadNpmTasks`, it can load task collections. |
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
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