Skip to content

Frontend updates for 0.12 #127

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

Closed
wants to merge 2 commits into from

Conversation

natefaubion
Copy link
Contributor

No description provided.

@natefaubion
Copy link
Contributor Author

This appears to work overall. Calling the API and compiling works, however the iframe is yielding a TryPureScript is undefined error. Not sure if there's something I didn't setup correctly.

@natefaubion
Copy link
Contributor Author

I think that is because of the require changes to add index.js.

@natefaubion
Copy link
Contributor Author

The client is now working as expected.

@@ -211,7 +211,7 @@ execute js bundle bc@(BackendConfig backend) = do
]

replaced = replace' (unsafeRegex """require\("[^"]*"\)""" global) (\s _ ->
"PS['" <> String.drop 12 (String.take (String.length s - 2) s) <> "']") (unwrap js)
"PS['" <> String.drop 12 (String.take (String.length s - 11) s) <> "']") (unwrap js)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of a nit but can we do something like s # String.split (String.Pattern "/") # Array.index 1 here instead? That should be more robust to these sorts of changes (if this ever changes again) and it's also a little clearer, I think.

@hdgarrood
Copy link
Collaborator

Resolved by #135

@hdgarrood hdgarrood closed this Feb 26, 2020
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