*I think Bash-like command line tools do have limitations*, and that's why 
there is grunt.
As I write CoffeeScript, I know exactly how convenient it is to write 
configs on a script and call it by command.
So I think command line tools are better used in triggering programes, 
instead of writing tasks.

Take CoffeeScript's command `coffee` as an example, `coffee` has so many 
options.
Those options do bring us convenience, but it also make is less easy to 
compose command line tools.
Composiing them with Unix pipe? No... I've been using Linux laptop for 
years and I'm still afraid of that.
And I hold a option that Node-based command line tools should less 
powerfull but more freedom for composing.

*I did some expriments weeks ago*. I suppose I'm not experienced enough. 
Need your help :)
Anywhy my code is here: https://github.com/jiyinyiyong/rain-boots
with some plugins I tried (Just reading the names is enough...):
https://github.com/jiyinyiyong/coffee-boots
https://github.com/jiyinyiyong/doodle-boots
https://github.com/jiyinyiyong/convert-boots
https://github.com/jiyinyiyong/scaffold-boots

The core of my idea is that: *let plugins communicate with events*.
Every component does its own things, meanwhile it sends and receive events 
to and from each other.
For a plugin, it simplely exports an instance of EventEmitter to a file in 
our project.
And we just call `node-dev dev.js` or `cake dev` to start all tasks.

For example, `doodle` is a tool that watches files, and I'm going to start 
it by `emit`:

doodle = require("../lib/").rain
doodle.emit "server"
doodle.emit "watch", "./tree-dir", "test-file"

And a component `emit`s events too, and we may add `.on` on it. :( I don't 
have demo here.
Then we may chain thoese events by callback, and make more plugins work 
togather.

*What can we do with such a tool?*
As I'm using CoffeeScript, Jade, Browserify.. etc. Watching and compiling 
is required everywhere.
And option parser and file writter are implemented once in each module. 
That's ugly.
Suppose I have several plugins here:
* one watch all files and send events so that others may catch,
* one listens to the events `.coffee` files change and compile it, then 
send events with the compiled code,
* one does the nearly same thing for `.jade` files and send events and code,
* one for `.js` files and handle them with `browserify` and send events and 
code,
* one listens to those events and write them to files..
* one listens and find the changes of the `.js` file from `browserify` and 
notify browser to reload.
By composing these ones I may take my code from Sublime to Chrome.

Now we already have a lot plugins for Grunt, but it feels not good enough 
for people play with Node, comparing to people play with Chrome.
*I'm not sure if this idea is a good enough to work on with?*
Is there any suggestion please?

Thanks.

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to