153 Commits

Author SHA1 Message Date
Nate Fischer
57df38c6ea
chore(lint): update lint dependencies (#948)
This updates `eslint-config-airbnb-base` and `eslint-plugin-import`.
This also addresses lint errors these updates raise, and excludes
several rules.

This also adds a minor simplification to the gendocs script.

Test: npm run lint
Test: npm run gendocs
2019-07-12 12:36:55 -07:00
Zearin
9035b27403 docs: fix typos and adjust markdown formatting (#825)
Miscellaneous docs/markdown changes. No change to logic.
2018-02-19 22:21:17 -08:00
Christian Zommerfelds
80d590ec05 Small clarification of verbose flag (#691)
* small clarification of verbose flag

* nfischer's documentation suggestion

* verbose flag documentation in source file
2017-03-30 20:30:30 -07:00
Nate Fischer
2d0428b1c9 Switch commands.json -> commands.js (#668)
WebPack has issues with importing JSON directly and using JavaScript
methods on it. For this reason, using the `.forEach()` method on the
imported JSON array caused a method-not-found error.

Instead, we can make this a real JavaScript array by keeping it in a
JavaScript file and exporting it as a field.

It should be noted that exporting it as `exports = [...]` does not work,
because Node won't actually interpret it as a JavaScript array (with
the required methods). So instead we can export it as
`exports.list = [...]` and access the `list` field to get the real
JavaScript array of command names.

Fixes #667
2017-02-28 01:34:51 -08:00
Nate Fischer
ac0ff873f1 refactor: add config.reset() and .resetForTesting() (#641)
Add .reset() and .resetForTesting() to shell.config and use .resetForTesting()
as a standard set-up for unit tests.
2017-01-07 22:40:38 -08:00
Nate Fischer
1548b3da00 refactor: list all commands in commands.json (#616)
* refactor: list all commands in commands.json

This also changes the order of commands in the docs, due to how I changed
the doc-generating script.

* fix lint error and alphabetize command list
2016-12-14 17:57:11 -08:00
Nate Fischer
7b9ec7fb66 refactor: allow pipeOnly commands (methods on ShellStrings) (#493) 2016-07-27 09:26:45 -07:00
Nate Fischer
8f7a7d8c57 refactor: expose plugin utils & add initial tests (#484)
* refactor: expose plugin utils & add initial tests

* fix: plugins work with Node v0.12
2016-07-26 21:32:33 -07:00
Nate Fischer
880d732611 fix: resolve a cylcic-dependency problem (#482)
If a plugin was imported before the ShellJS instance was created, the program
would crash (common.register wouldn't be instantiated yet). Now plugins can be
imported either before or after the ShellJS instance is created.
2016-07-24 17:52:28 -07:00
Nate Fischer
bd6f96db33 refactor: hook new uniq() command using new format (#478) 2016-07-23 10:56:26 -07:00
Shubham Joshi
3367e0c6c7 feat(command): new command: uniq() (#453)
* Added uniq.js, need to add tests

* Added basic tests for uniq.js

* Implemented uniq and added tests

* Generated docs for uniq

* Fixed lint error

* Added suport for -c and -d to uniq

* Generated docs

* Fixed formatting errors. Uniq now correctly returns empty string when output is specified

* Added uniq to piped methods

* Improved comment legibility

* Cleaned up the pipeline

* Added pipe test for uniq

* Converted uniq pipe test file to use linux line endings

* Fixed linting errors
2016-07-22 15:49:09 -07:00
Nate Fischer
3951a87913 refactor: commands now register themselves (#475) 2016-07-21 17:37:11 -07:00
Nate Fischer
06c3d44e5b refactor: expose pipe-ability to command configuration (#464) 2016-06-17 16:05:59 -07:00
Nate Fischer
57a9be2693 docs: comment code better to help contributors 2016-05-12 07:40:18 -07:00
Nate Fischer
60d63015cd feat(command): new command: tail() 2016-03-31 21:05:30 -07:00
Nate Fischer
a1d5f6afb6 feat(command): new command: head() 2016-03-31 21:05:30 -07:00
Nate Fischer
f6952cb781 feat(command): new command: sort() 2016-03-31 21:05:30 -07:00
Nate Fischer
a41950770f feat(glob): expose config.globOptions.
Allow users to customize the settings of `glob.sync()` (if they so-desire). This
doesn't change the default behavior.
2016-03-24 18:06:26 -07:00
Nate Fischer
e282a9be9b docs: wildcards for all commands, other docs cleanups 2016-03-20 14:03:23 -07:00
Nate Fischer
3daa0db7e5 docs: move make tool docs to the wiki 2016-03-20 01:10:19 -07:00
Nate Fischer
98fc7f48ef feat(pipe): add support for pipes between commands 2016-02-20 22:26:31 -08:00
Nate Fischer
6ebc2d3db7 refactor(shellstring): return consistent objects
- fix(string): no longer overrides string prototype
 - exec() now returns a ShellString object
2016-02-19 14:54:30 -08:00
Nate Fischer
0166658597 fix(verbose): verbose-style logging is consistent 2016-02-16 21:11:31 -08:00
Jason McLaurin
6bf7d77ecf change config.fatal to throw an exception instead of terminating the node.js process 2016-02-16 11:19:25 -06:00
Nate Fischer
3a7eb3f2ad feat(glob): glob support for (almost) all commands 2016-02-13 21:22:48 -08:00
Nate Fischer
ca045ea4c5 feat(set): add new set() command
Add new set() command as a wrapper for `config` variables. This takes the `-e`,
`-v`, `+e`, and `+v` flags.
2016-01-31 20:17:37 -08:00
Nate Fischer
267799ae96 Docs updates 2016-01-19 16:45:35 -08:00
Brett Jones
08b4212b15 add touch(1) 2016-01-11 19:47:09 -06:00
Artur Adib
fdf633003e Bump version, update README for new make args 2015-05-19 10:51:03 -04:00
Michael Schoonmaker
b715c2c240 Add ln support, including both -s and -f options. 2013-10-10 18:03:09 -07:00
Artur Adib
a81064c33f require Node >=0.8 2013-08-26 14:04:21 -04:00
Andrew Duffy
91c82e0cc6 Fixed README so that it's based off in-source documentation
Renamed appendTo() to toEnd().
2013-08-25 19:36:16 -07:00
Andrew Duffy
78e89faf28 Added appendTo() function to imitate '>>' redirect-and-append pipe. 2013-08-25 16:36:05 -07:00
Artur Adib
561b1ea99c factoring docs, sed.js fix 2013-08-25 18:09:31 -04:00
Artur Adib
14c053abb0 chmod, clean-up 2013-08-25 17:02:37 -04:00
Artur Adib
36af72194e chmod, clean-up 2013-08-25 17:02:07 -04:00
Artur Adib
e0855c3cff exec,tempdir 2013-08-25 16:48:44 -04:00
Artur Adib
5f3da49248 dirs,pushd,popd 2013-08-25 16:34:24 -04:00
Artur Adib
93eb40d912 echo 2013-08-25 16:24:33 -04:00
Artur Adib
02df7985fd which 2013-08-25 16:23:31 -04:00
Artur Adib
715c79238e grep\ 2013-08-25 16:21:02 -04:00
Artur Adib
00c7b80cfb sed 2013-08-25 16:19:39 -04:00
Artur Adib
27978b8f9a to 2013-08-25 16:18:21 -04:00
Artur Adib
305dff0df2 cat 2013-08-25 16:16:11 -04:00
Artur Adib
a348cc1257 test 2013-08-25 16:14:56 -04:00
Artur Adib
d7b28a2a5a mkdir 2013-08-25 16:13:20 -04:00
Artur Adib
bf9ed2672e mv 2013-08-25 16:09:52 -04:00
Artur Adib
74f5492184 rm 2013-08-25 16:04:46 -04:00
Artur Adib
592dd8ddd0 cp 2013-08-25 15:52:05 -04:00
Artur Adib
dcac00ade5 find 2013-08-25 15:42:44 -04:00