First draft of documentation update for v0.15#421
Conversation
JordanMartinez
left a comment
There was a problem hiding this comment.
Overall looks good.
Should we create a tag in this repo of its state before any ES modules work gets merged and then link to that for everyone on pre-0.15.x?
|
|
||
| - The name of the foreign module must be the same as its companion PureScript module, with its extension changed to `.js`. This associates the foreign module with the PureScript module. | ||
| - All exports must be of the form `exports.name = value;`, specified at the top level. | ||
| - All exports must be of the form `export const name = value;`, specified at the top level. |
There was a problem hiding this comment.
This is only true for values, not necessarily functions (as the example below breaks this rule).
| ### Compiling CommonJS Modules | ||
|
|
||
| Spago can also be used to generate CommonJS modules from PureScript code. This can be useful when using NodeJS, or just when developing a larger project which uses CommonJS modules to break code into smaller components. | ||
|
|
||
| To build CommonJS modules, use the `spago build` command: | ||
|
|
||
| $ spago build | ||
| ... | ||
| Build succeeded. | ||
|
|
||
| The generated modules will be placed in the `output` directory by default. Each PureScript module will be compiled to its own CommonJS module, in its own subdirectory. |
There was a problem hiding this comment.
I feel like this is still important to say but for ES modules now.
There was a problem hiding this comment.
Ok will add it again with ES modules then
There was a problem hiding this comment.
I have added it again and updated to es modules. However I think this paragraph needs a bigger rewrite, it doesn't make much sense anymore imho.
Sounds good |
|
Perhaps we shouldn't merge this until we're getting closer to the v0.15.0 release? Regardless, I've made the |
|
@JordanMartinez should we merge this already? |
|
I think we'll do so immediately after the |
|
Hmm... Then again, this is the first draft, meaning there are other changes we might want to make. And I already have the 0.14-era tag made. |
|
@JordanMartinez should we merge this now? |
|
@sigma-andex I don't think so. My main reasons against merging this now is because On the other hand, we don't have a branch where we can iterate on the |
* First draft of documentation update for v0.15 (#421) * First draft of documentation update for v0.15 * Describe ambiguous matches in instance chains (#392) * Update tool versions * Update parsing library changelog * Update 0.15 guides to account for `Stream.write` breaking change Co-authored-by: sigma-andex <77549848+sigma-andex@users.noreply.github.com> Co-authored-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
No description provided.