-
Notifications
You must be signed in to change notification settings - Fork 422
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: Add --out-dir flag #13
Comments
You'd have to do:
To avoid the shell interpreting the globs first. I think instead of dealing with the shadowing globs, this should be achieved as so:
Now the shell can interpet the glob and it will work exactly as expected. You could also now use # Start a process for every 256 .d2 files.
# Run up to 8 processes at a time.
find . -name './static/d2/*.d2' | xargs d2 -P8 -n256 --out-dir ./static/generated The xargs example is a little contrived as |
does it even need the CLI can check that the second arg (output) is an existing directory, and treat it as |
@alixander that wouldn't work with globs. globs are by convention always at the end of a command invocation. that's how also the directory may not exist, we ought to create it then instead of interpreting it as a file to be compiled. the dual behaviour would be generally confusing anyway. |
okay, this task is to add |
will also need |
up |
d2 ./static/d2/*.d2 ./static/generated/*.svg
The text was updated successfully, but these errors were encountered: