8000 Only force source-dir / dest dir to exist if relevant for operation · Issue #71 · okv/east · GitHub
[go: up one dir, main page]

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

Only force source-dir / dest dir to exist if relevant for operation #71

Open
midgleyc opened this issue Feb 11, 2021 · 3 comments
Open

Comments

@midgleyc
Copy link

Currently, if the source-dir directory is configured, both source-dir and dest directories are required to e AF4E xist for all operations.

However, "create" shouldn't care if "dest" exists or not, and "migrate" shouldn't care whether "source-dir" exists.

My use-case is that I write the migrations in TypeScript, and want to copy only the compiled files onto production (and sometimes that I want to "east create" from a fresh repo without having run "tsc"). I get around this by having a separate .eastrc on prod that doesn't specify a source-dir, but it would be nicer if I didn't have to.

I can't just always run npx east init because that fails to make directories recursively, and my migrations directory is "dist/db/migrations", and "dist" doesn't exist.

@okv
Copy link
Owner
okv commented Feb 14, 2021

Hi, not a regular use-case, for sure 😃
I would add -r|--recursive flag to the init command, could be implemented easily since fs.mkdir has recursive option.

@midgleyc
Copy link
Author

recursive came in in 10.12.0, but if you're okay with upping the engines requirement (in package.json) to that I think it's a nice solution :)

@okv
Copy link
Owner
okv commented Feb 15, 2021

Good point about updating requirements, I think it's still a good solution considering that nodejs v10 is going to reach its end of life in the foreseeable future. I'll try to implement it soon.

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

2 participants
0