Skip to content

FileAttachment API from nodejs #1455

Answered by mbostock
declann asked this question in Q&A
Discussion options

You must be logged in to vote

This isn’t currently supported, no. You can use readFile from fs to read files in Node.js, and you’re free to copy the helper methods for parsing out of our standard library. But, be aware that Framework doesn’t actually use @observablehq/stdlib for the standard library; we instead forked it to create a new version for Framework:

https://github.com/observablehq/framework/tree/main/src/client/stdlib

For reading Excel files:

https://github.com/observablehq/framework/blob/main/src/client/stdlib/xlsx.js

I’d like to extract this code from Framework and publish it to npm; please upvote #852 if you are interested in this feature.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@declann
Comment options

Answer selected by declann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants