Skip to content
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

Add tempDir option to documentation #91

Open
lapwat opened this issue Feb 22, 2021 · 1 comment
Open

Add tempDir option to documentation #91

lapwat opened this issue Feb 22, 2021 · 1 comment

Comments

@lapwat
Copy link

lapwat commented Feb 22, 2021

I noticed that there is a tempDir option that you can use to specify a place to put temporary files used by the script.

if not @options.tempDir

It would be useful to refer to it in the README.

@lapwat
Copy link
Author

lapwat commented Feb 22, 2021

A better default value for tempDir would be to use OS specific directory:

https://nodejs.org/api/all.html#fs_fs_mkdtempsync_prefix_options

// require fs, os, path

const prefix = path.join(os.tmpdir(), 'epub-gen-');
const tempDir = fs.mkdtempSync(prefix);

// work with tempDir

fs.rmSync(tempDir, { recursive: true, force: true });

Daylon pushed a commit to Daylon/epub-gen that referenced this issue Sep 29, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant