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

Adjust example API usage #37

Open
JPMeehan opened this issue Sep 18, 2023 · 3 comments
Open

Adjust example API usage #37

JPMeehan opened this issue Sep 18, 2023 · 3 comments

Comments

@JPMeehan
Copy link

JPMeehan commented Sep 18, 2023

The example API usage for some reason assumes the current working directory is the user's Modules folder, rather than the module folder itself; this contrasts with the shell commands, as those are configured to know the user's Data folder and which subfolder to check in.
So instead of await compilePack("mymodule/packs/src/actors", "mymodule/packs/actors"); the example usage should either mimic a full path or go await compilePack("packs/src/actors", "packs/actors");

@JPMeehan JPMeehan changed the title ExtractPack Operation fails partway through when given partial path Adjust example API usage Sep 18, 2023
@Fyorl
Copy link
Contributor

Fyorl commented Sep 18, 2023

I don't understand what is being asked here. The paths used in the API example are just that: examples. Any relative paths you provide to any API will be relative to the CWD.

@JPMeehan
Copy link
Author

So, some of this is probably because I was adjusting scripts from the shell command to using the node API, where the paths are handled differently, so I was not in the mindset that they were strictly relative paths. But also in terms of general use case I think it's more likely that the CWD is the module's folder and the examples should reflect that.

@Fyorl
Copy link
Contributor

Fyorl commented Sep 18, 2023

So, some of this is probably because I was adjusting scripts from the shell command to using the node API, where the paths are handled differently

Only if you're using the workon porcelain. If you use --in and --out, they will also be relative to the CWD (or at least I thought they were).

But also in terms of general use case I think it's more likely that the CWD is the module's folder and the examples should reflect that.

Yes, that's probably true.

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