Moncader/rejs — pull request #1 by watilde (2014-11-22 06:01:11+00:00)
Title: Add rejs cli for npm

Hi @Moncader

I added cli for npm. Behavior is the following:

---
Print help message
```
$ rejs -h
Usage:
rejs [options] [file ...]

Examples:
rejs foo.js bar.js baz.js
rejs --out out.js foo.js bar.js baz.js

Options:
-h, --help Print this message
-o, --out Output to single file
-v, --version Print rejs version
```

Print rejs version
```
$ rejs -v
v0.0.2
```

Output to stdout
```
$ rejs samples/node/[^node]*.js
var namespace = {};(function() {

namespace.one = {
hello: {}
};

}());(function(global) {

global.namespace.one.hello.two = 'Hello, world!';

}(this));
```
Output to single file
```
$ rejs -o samples/node/out.js samples/node/[^node]*.js
$ cat samples/node/out.js
var namespace = {};(function() {

namespace.one = {
hello: {}
};

}());(function(global) {

global.namespace.one.hello.two = 'Hello, world!';

}(this));
```
---

Could you please any thought on this please?
Thanks.