GithubHelp home page GithubHelp logo

elm-rails's People

Contributors

97jaz avatar ankane avatar botandrose avatar botandrose-machine avatar dependabot[bot] avatar fbonetti avatar lsimoneau avatar mariochavez avatar nicolasleger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

elm-rails's Issues

Update the README with working example for ELM 0.17+

Hi!

The example in the README gives me the following error when using ELM 0.17.1:

-- SYNTAX PROBLEM ------------------------------------- app/assets/elm/Hello.elm

I ran into something unexpected when parsing your code!

1| module Hello where
                ^
I am looking for one of the following things:

    something like `exposing (..)` which replaced `where` in 0.17
    whitespace

Since this is my very first attempt at ELM, the first example I encounter should work with the current stable version 😄 . If a PR is desired, I can do it.

Disabling caching slows down development considerably

First of all, it's awesome that you've written all this 👍 Unfortunately having to disable asset caching (?) in the development environment makes this almost unusable as I'm working on an app that has a lot of assets and recompiling them on every request takes upwards of 10 seconds.

Do you think that it's maybe possible to change the underlying implementation to not require me to do this? I've had a quick look at the sass-rails code and it does it differently by registering the file extensions and how to transform them. I don't know enough about Elm yet to know if that would be a feasible approach as well or not.

I'd be willing to help with this of course!

requiring modules in different directories under assets/elm?

I'm probably doing something wrong, but I can't get elm-make to find all of my modules when going through the asset pipeline. (It works in a repl, so I'm not sure what's going one.)

I have a directory structure like:

app/assets/elm
app/assets/elm/Models
app/assets/elm/Api

where my main module (in app/assets/elm) imports modules from the other directories, and modules in Models also depend on a module in Api. I added require lines to my app/assets/javascripts/application.js, but when elm-make tries to compile a module in Models that depends on one in Api, it can't find it.

Originally my elm-package.json (in the root of the rails project) just had "." in source-directories, so I tried adding "Api" and "Models," but that didn't help.

Example with a dynamic port

@fbonetti maybe you can clarify this for me. The current example in the README has a port with a value that's passed in as a "flag". If we want interop with a JavaScript library, we need to have access to the JavaScript variable referencing the Elm application. In my app I've solved this by ignoring the view helpers and just embedding my Elm app using the JS API directly. Is there a way to do this with the view helpers?

If not, I'd suggest we could deprecate the view helpers and update the README with an example using straight JS to manage the embed.

Rails generator?

It might be nice to have rails generate elm-rails:install which would create a skeleton Elm app, require it in application.js, update the .gitignore, etc.

Working with Turbolinks

Hello !

I'm trying to use elm-rails to render elm on a rails server using turbolinks. However, turbolinks badly handle elm-embed tags. On first load, the javascript is correctly loaded, but if I load the page through turbolinks, the javascript is not executed (and it's rather bad because all HTML is written in Elm).

Any idea to fix this ?

Elm 0.18

Hi there, I appreciate Elm 0.18 is just out today, but I was wondering if you have any plans of supporting it?

Installation

Slight nitpick, you need to "require" elm_modules in application.js

Just need to edit the documenation from
//= elm_modules
to ->
//= require elm_modules

Thanks for the gem!

I cannot find module...

Hi.

I wrote a small elm component for my rails app. And it uses

import Bootstrap.Grid exposing (..)
import Bootstrap.Wells exposing (..)

I did elm package install JeremyBellows/elm-bootstrapify and it is in elm-package.json

But from Rails I get exception:

I cannot find module 'Bootstrap.Grid'.

Module 'PriceCalculator' is trying to import it.

Potential problems could be:
  * Misspelled the module name
  * Need to add a source directory or new dependency to elm-package.json

Am I wrong? Or JeremyBellows? Or it is something here?

Debug Flag

The elm debugger is actually a great help when dealing with business users submitting bug reports. It was easy to re-train my stakeholders to export their session from my staging environment and attach it to their bugs.

I had forked @lsimoneau 's dependencies fix before you merged it, but I'll go ahead and fork this original repo so that I can submit a pr.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.