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

Make pagesInit return a Promise with the Elm app instance #50

Merged
merged 1 commit into from
Jan 28, 2020
Merged

Make pagesInit return a Promise with the Elm app instance #50

merged 1 commit into from
Jan 28, 2020

Conversation

icidasset
Copy link
Contributor

@icidasset icidasset commented Jan 21, 2020

Hi again 👋

I made this change in a fork for our project so we could set up analytics and use ports.
Is this of any use to you? I can make changes if need be. Allows you to do:

const { Elm } = require("./src/Main.elm")
const initializePages = require("elm-pages")

initializePages({
  mainElmModule: Elm.Main
}).then(app => {
  // app.ports.somePort.subscribe(...)
})

@dillonkearns
Copy link
Owner

Fantastic, this is excellent! Tried it out and it works very smoothly. Thanks so much @icidasset! 🙏

@dillonkearns dillonkearns merged commit d512cc3 into dillonkearns:master Jan 28, 2020
@dillonkearns
Copy link
Owner

@all-contributors please add @icidasset for code.

@allcontributors
Copy link
Contributor

@dillonkearns

I've put up a pull request to add @icidasset! 🎉

@dillonkearns
Copy link
Owner

Released! https://github.com/dillonkearns/elm-pages/blob/master/CHANGELOG-NPM.md#122---2020-01-27

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