Skip to content

Commit b67b94c

Browse files
committed
docs: move make tool docs to the wiki
1 parent 4078f26 commit b67b94c

1 file changed

Lines changed: 7 additions & 51 deletions

File tree

‎README.md‎

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ Think ShellJS is cool? Check out some related projects (like
2828
in our [Wiki page](https://github.com/shelljs/shelljs/wiki)!
2929

3030
## Command line use
31-
If you just want cross platform UNIX commands, checkout [`shx`](https://github.com/shelljs/shx).
32-
It exposes `shelljs` to the command line.
31+
32+
If you just want cross platform UNIX commands, checkout our new project
33+
[shelljs/shx](https://github.com/shelljs/shx), a utility to expose `shelljs` to
34+
the command line.
3335

3436
For example:
37+
3538
```
3639
$ shx mkdir -p foo
3740
$ shx touch foo/bar.txt
@@ -125,55 +128,8 @@ var shell = require('shelljs');
125128
shell.echo('hello world');
126129
```
127130

128-
## Make tool
129-
130-
A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile.
131-
In this case all shell objects are global, and command line arguments will cause the script to
132-
execute only the corresponding function in the global `target` object. To avoid redundant calls,
133-
target functions are executed only once per script.
134-
135-
Example:
136-
137-
```javascript
138-
require('shelljs/make');
139-
140-
target.all = function() {
141-
target.bundle();
142-
target.docs();
143-
};
144-
145-
target.bundle = function() {
146-
cd(__dirname);
147-
mkdir('-p', 'build');
148-
cd('src');
149-
cat('*.js').to('../build/output.js');
150-
};
151-
152-
target.docs = function() {
153-
cd(__dirname);
154-
mkdir('-p', 'docs');
155-
var files = ls('src/*.js');
156-
for(var i = 0; i < files.length; i++) {
157-
var text = grep('//@', files[i]); // extract special comments
158-
text = text.replace(/\/\/@/g, ''); // remove comment tags
159-
text.toEnd('docs/my_docs.md');
160-
}
161-
};
162-
```
163-
164-
To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`.
165-
166-
You can also pass arguments to your targets by using the `--` separator. For example, to pass `arg1` and `arg2` to a target `bundle`, do `$ node make bundle -- arg1 arg2`:
167-
168-
```javascript
169-
require('shelljs/make');
170-
171-
target.bundle = function(argsArray) {
172-
// argsArray = ['arg1', 'arg2']
173-
/* ... */
174-
}
175-
```
176-
131+
For less-commonly used commands and features, please check out our [wiki
132+
page](https://github.com/shelljs/shelljs/wiki).
177133

178134
<!-- DO NOT MODIFY BEYOND THIS POINT - IT'S AUTOMATICALLY GENERATED -->
179135

0 commit comments

Comments
 (0)