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

clarify API documentation #22

Open
szkiba opened this issue Sep 6, 2024 · 0 comments
Open

clarify API documentation #22

szkiba opened this issue Sep 6, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@szkiba
Copy link
Collaborator

szkiba commented Sep 6, 2024

Analyze() can detect dependencies from several sources (script, manifest file, environment variable). The Script source documentation is not detailed enough and therefore causes misunderstanding.

The Script option is a Source type struct, in which Name contains the name of the script file, and Contents contains the contents of the script. The script included in the Contents must be in CommonJS format and must not contain external script references (neither local nor remote), it can only refer to k6 extensions. That is, the script is bundled. The script should contain source map information to aid debugging.

If Contents is empty, loading and bundling is performed by Analyze(), otherwise bundling is the responsibility of the caller.

@szkiba szkiba added the documentation Improvements or additions to documentation label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant