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

🐛fix test failed on Windows #7

Merged
merged 3 commits into from
Sep 13, 2021
Merged

🐛fix test failed on Windows #7

merged 3 commits into from
Sep 13, 2021

Conversation

ix64
Copy link
Contributor

@ix64 ix64 commented Sep 9, 2021

replace filepath with path

@nlepage nlepage self-assigned this Sep 13, 2021
@nlepage nlepage merged commit ad473c3 into nlepage:main Sep 13, 2021
@nlepage
Copy link
Owner

nlepage commented Sep 13, 2021

Thank you!

rohansingh added a commit to tidbyt/pixlet that referenced this pull request Apr 24, 2024
It appears that `nlepage/go-tarfs` correctly supports Windows by [using
`path` instead of `filepath`][1].

[1]: nlepage/go-tarfs#7
rohansingh added a commit to tidbyt/pixlet that referenced this pull request Apr 24, 2024
* Add the ability to read files from Starlark

Starlark scripts can now load arbitrary files from their bundle and read
them using a Python-like `open()` and `read()` API. A `readall()`
convenience function is also provided.

The examples have been updated to use this functionality where relevant.
For example:

```
load("icon.png", icon = "file")

BTC_ICON = icon.readall()
```

The `pixlet render` command can now accept an entire directory
containing multiple Starlark files and static resources.

* Remove `file.open` and `read()`

Remove the `open()` and `read()` functions, so the only way to read a
file is `readall()`.

If there is demand for the other methods, we can add them back later.

* Add directory support to `pixlet serve`

* Implement `pixlet bundle` for directories

* Fix path problems on Windows

`fs.FS` always uses slash-separated paths, even on Windows. So we should
be manipulating those paths with `path`, not `filepath`.

* Switch tarfs implementations for Windows support

It appears that `nlepage/go-tarfs` correctly supports Windows by [using
`path` instead of `filepath`][1].

[1]: nlepage/go-tarfs#7
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

Successfully merging this pull request may close these issues.

2 participants