Repository navigation
0.4.0: The Shipshape Update
This release is about smoothing off rough edges, and fixing a few long-standing inconveniences.
Script headers have been completely revamped: they're now much more compact, no longer raise syntax errors in some editors, and contain Tasklemon's full name, for better discoverability.
- #!/usr/bin/env lemon
- #version 0.2
- #require extract-iptc@0.1.3
- #require username@5.0.0
+ #!/usr/bin/env tasklemon-v0.2
+ // tl:require: extract-iptc@0.1.3, username@5.0.0Command-line arguments can now be marked as required, or given a default value, and Tasklemon will produce a nice error message when appropriate. Also, the -- separator is now supported, along with using = for named argument values.
cli.accept({
quality: ['-q --quality', Number],
source: ['-s --source', Folder, required()],
destination: ['-d --destination', Folder, required()]
});
// $ lemon demo.js --quality=90
// → Argument error: “--source” and “--destination” are requiredRough edges: smoothed off!
New
- Add
required()anddefaultsTo()- For making a script argument mandatory, or setting a fallback value
- Add
File(),Folder()andItem()globals, for absolute paths
Improvements
- Change default shebang to include runtime version
- Version header is deprecated
- Change require header format from
#requireto// tl:require:- Supports multiple packages per line
- Improve command-line argument parsing
- Named arguments can be specified with a
=separator - Negative numbers and standalone dashes are fully supported
--delimiter can be used to pass anything as a positional argument
- Named arguments can be specified with a
cli.tell()now formats its output just likeconsole.log()does
Fixes
Item.moveTo()can move items across volumes- runtime error messages are output to
stderrinstead ofstdout
Documentation updates
- Small improvements to the readme and the API docs
- API reference has a dark mode
- Update logo to be more yellow (yeah)
- Readme logo now has a homely white outline, for readability when in dark color scheme
Dev environment updates
- Tweak ESLint config
- Tests: Test
cli,ScriptParser