-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use new subcommand with usage and add help texts (#84)
- Loading branch information
Showing
9 changed files
with
85 additions
and
35 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
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
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
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
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,32 +1,30 @@ | ||
module.exports = function (opts) { | ||
module.exports = function (opts, help, usage) { | ||
if (opts.version) { | ||
var pkg = require('../package.json') | ||
console.error(pkg.version) | ||
process.exit(1) | ||
} | ||
console.error('Usage: dat <cmd> [options]') | ||
console.error(' dat create create a local archive') | ||
console.error(' dat snapshot create a local snapshot archive') | ||
console.error(' dat clone <dat-link> <directory> clone a remote archive') | ||
console.error('') | ||
console.error(' dat sync sync files with the network') | ||
console.error(' dat pull update from remote archive & exit') | ||
console.error('Sharing Files:') | ||
console.error(' dat create [<dir>] create a local archive') | ||
console.error(' dat snapshot create a local snapshot archive') | ||
console.error(' dat sync watch for changes & sync files with the network') | ||
console.error('') | ||
console.error(' --dir=<folder> set directory') | ||
console.error(' --no-import do not import files (create, sync)') | ||
console.error(' --quiet only print out the dat link') | ||
console.error(' --port=3282 set the port for discovery') | ||
console.error(' --no-utp do not use utp for network connections') | ||
console.error('Downloading Files:') | ||
console.error(' dat clone <link> [<dir>] clone a remote archive') | ||
console.error(' dat pull update from remote archive & exit') | ||
console.error(' dat sync sync files with the network') | ||
console.error('') | ||
console.error(' dat register register for an account') | ||
console.error(' dat login login to an account') | ||
console.error(' dat logout logout from the server') | ||
console.error(' dat whoami get login information') | ||
console.error(' dat publish publish dataset to registry') | ||
console.error('') | ||
console.error(' dat --version, -v get your dat version') | ||
console.error(' dat help print this usage guide') | ||
console.error(' dat doctor run the dat network doctor') | ||
console.error('Help & Troubleshooting:') | ||
console.error(' dat doctor run the dat network doctor') | ||
console.error(' dat [<command>] --help, -h print help for a command') | ||
console.error(' dat --version, -v print your dat version') | ||
console.error('') | ||
if (usage) { | ||
console.error('General Options:') | ||
console.error(usage) | ||
} | ||
console.error('Have fun using Dat! Learn more at docs.datproject.org') | ||
process.exit(1) | ||
} |
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