mattdesl / canvas-sketch

[beta] A framework for making generative artwork in JavaScript and the browser.
MIT License
5.05k stars 394 forks source link

Cite download path #80

Closed mracette closed 2 years ago

mracette commented 4 years ago

I'd like to be able to cmd + s into a folder in the working directory where my project lives. Possible to add a filePath parameter to settings?

mattdesl commented 4 years ago

This should already be possible with the --output flag, like --output .

https://github.com/mattdesl/canvas-sketch/blob/master/docs/exporting-artwork.md#changing-the-output-folder

mracette commented 4 years ago

Thanks for pointing that out. Would it be possible to also implement that as part of the export settings? https://github.com/mattdesl/canvas-sketch/blob/master/docs/api.md

kellymilligan commented 4 years ago

Following up on this, I'd quite like the option to specify some project/global defaults for select CLI parameters.

I'm setting up an artwork tempate as a GitHub template repo. I'd like to use a consistent folder structure here, e.g. --output=./output in all repos/projects I clone from this template for continuity. For now I'm having to include --output each time I run a sketch from the cli to achieve this, and can end up with some file structure differences between repos if I forget to amend the --output flag. I think some other system-specific flags like --dir and --port could be useful here too, as they're less likely to change between sketches.

Maybe what could be nice here is to follow a .*rc file pattern, like .babelrc or .eslintrc, where it'll search for a .sketchrc file within the project folder, then upward to the user root directory before applying the cli defaults for any params that aren't explicity passed along with the cli command.

Cheers!

mattdesl commented 2 years ago

@kellymilligan Global settings is something that could be considered for the CLI. Discussion of that can continue: https://github.com/mattdesl/canvas-sketch/issues/82