-
Notifications
You must be signed in to change notification settings - Fork 222
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
Document k6/experimental/fs
module
#1419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oleiade does it work make docs
for you? I wasn't able to see the preview with the current changes included.
docs/sources/next/javascript-api/k6-experimental/fs/file/read.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/file/read.md
Outdated
Show resolved
Hide resolved
@codebien $ cd docs/
$ make docs
docker pull -q grafana/docs-base:latest
docker.io/grafana/docs-base:latest
/Users/theocrevon/Dev/grafana/documentation/k6-docs/docs/make-docs k6:UNVERSIONED:k6-docs
node scripts/docs/versions.js
k6 -> v0.47.x
/usr/local/bin/hugo server --environment=docs -p 3003 --buildDrafts=false --buildFuture=false --bind 0.0.0.0 --noHTTPCache --minify --poll 700ms --renderToDisk -d dist | grep -Ev 'REF_NOT_FOUND: Ref "/(go|blog)/'
Start building sites …
hugo v0.115.2 linux/arm64 BuildDate=unknown
| EN | DE | FR | ES | PT-BR | ZH-CN
-------------------+------+------+------+------+-------+--------
Pages | 2328 | 12 | 12 | 12 | 12 | 12
Paginator pages | 0 | 0 | 0 | 0 | 0 | 0
Non-page files | 0 | 0 | 0 | 0 | 0 | 0
Static files | 1274 | 1274 | 1274 | 1274 | 1274 | 1274
Processed images | 0 | 0 | 0 | 0 | 0 | 0
Aliases | 4 | 0 | 0 | 0 | 0 | 0
Sitemaps | 2 | 1 | 1 | 1 | 1 | 1
Cleaned | 0 | 0 | 0 | 0 | 0 | 0
Built in 2541 ms
Watching for changes in /hugo/{content,data,i18n,layouts,package.json,static}
Use watcher with poll interval 700ms
Watching for config changes in /hugo/config/_default, /hugo/config/docs
Environment: "docs"
Serving pages from disk
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
View documentation locally:
http://localhost:3002/docs/k6/
Press Ctrl+C to stop the server |
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
docs/sources/next/javascript-api/k6-experimental/fs/file/_index.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/file/_index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Oleg Bespalov <oleg.bespalov@grafana.com>
docs/sources/next/javascript-api/k6-experimental/fs/FileInfo.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/file/read.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/file/read.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/file/read.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, mostly small nits!
docs/sources/next/javascript-api/k6-experimental/fs/FileInfo.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/SeekMode.md
Outdated
Show resolved
Hide resolved
|
||
In the following example, we open a file and read it in chunks of 128 bytes until we reach the end of the file. | ||
|
||
{{< code >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just as a comment, the {{< code >}}
shortcode main purpose is to support multiple code snippets (how to do X in JavaScript, and in Ruby, for example). It still works if you have a single code snippet inside of it, but we don't necessarily need it here. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's good to know! I think it still makes sense to have it even with a single example? Makes it more explicit too as it will display "Javascript" above the code right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/sources/next/javascript-api/k6-experimental/fs/file/seek.md
Outdated
Show resolved
Hide resolved
docs/sources/next/javascript-api/k6-experimental/fs/file/stat.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
Co-authored-by: Heitor Tashiro Sergent <heitortsergent@gmail.com>
The
k6/experimental/fs
module will land in v0.48.0 and will empower users to read files efficiently and conveniently within their k6 scripts.This Pull Request documents the module's APIs.