项目作者: kangkyu

项目描述 :
practice app ⭐️ only for learning https://buzzword-bingo-from-pragstudio.herokuapp.com/
高级语言: Ruby
项目地址: git://github.com/kangkyu/elm-supported-rails.git
创建时间: 2017-05-14T06:04:26Z
项目社区:https://github.com/kangkyu/elm-supported-rails

开源协议:

下载


README

a practice app using webpacker elm support

Memorandom

generate a new rails app

  1. rails new elm-supported-rails --webpack

get newest webpacker

  1. # Gemfile
  2. gem 'webpacker', git: 'https://github.com/rails/webpacker.git', branch: 'master'
  1. bundle
  2. rails webpacker:install
  3. rails webpacker:install:elm

alternatively you can (after the new version webpacker with elm support released)

  1. rails new elm-supported-rails --webpack=elm
  1. rails server
  2. bin/webpack-dev-server # don't forget

<%= javascript_pack_tag "hello_elm" %> on some page
as commented at app/javascript/packs/hello_elm.js file

buzzword bingo

Elm tutorial from Pragmatic Studio

https://pragmaticstudio.com/courses/elm

but with Rails code (with webpacker elm) such as

  1. @entries = Entry.order("RANDOM()").limit(5)

deploy to Heroku

add path "pathToMake=node_modules/.bin/elm-make"
to config/webpack/loaders/elm.js file
=> Is this necessary for heroku?

added that to avoid this error.

  1. Could not find Elm compiler "elm-make". Is it installed?

live on buzzword-bingo-from-pragstudio.herokuapp.com

Todo

  • Add input field (Lesson 20)