-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI Simplification #10
Conversation
Force pushing workflow Simple overrides Local branch preservation Dry runs |
var path = require('path'); | ||
var readme = path.join(__dirname, '..', 'README.md'); | ||
var readmeText = String(fs.readFileSync(readme)); | ||
var usage = /```usage([\s\S]*?)```/.exec(readmeText)[1].trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 This is clever but is it worth it for DRYness? I'm not sure how often the usage docs will change in the future once we have API stability. Parsing the README at runtime seems kinda crazy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push-dir|scott-dev⚡ ⇒ node benchmark.js
showUsageFromDisk x 53,288 ops/sec ±3.82% (79 runs sampled)
showUsageFromString x 76,362,229 ops/sec ±2.10% (76 runs sampled)
Fastest is showUsageFromString
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs.createReadStream('usage.txt').pipe(process.stdout)
* Added message support * Update README
push-dir [remote] <dir>:<branch> [options...]
syntax simplifying the CLI #7--preserve-local-temp-branch
Lost changes when using --allow-unclean #9--help, -h
flag--help
output when used incorrectly