Coder Social home page Coder Social logo

cambricorp / elm-phoenix-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ronanyeah/elm-phoenix-example

0.0 1.0 0.0 85 KB

minimum elm + phoenix setup, with webpack

License: GNU General Public License v3.0

Elm 10.09% JavaScript 1.73% Elixir 86.79% HTML 1.39%

elm-phoenix-example's Introduction

Elm + Phoenix

This is a minimum setup for an Elm + Phoenix project, using webpack for bundling.

This is intended to be a teaching tool rather than a production boilerplate, therefore the webpack config is as small as possible, and there is only very basic Phoenix usage.

The Phoenix application has been named Foo to make it easy to identify where your application name is used.

REQUIREMENTS

FEATURES

BACKEND:
Basically just $ mix phx.new foo --no-brunch, with changes made to ./lib/foo/web/templates/layout/app.html.eex and ./lib/foo/web/templates/page/index.html.eex to load up the Elm app.
FRONTEND:
All related files are found in ./assets, including package.json, elm-package.json and webpack.config.js. Therefore npm install and elm-package install will have to be run from there.
SCRIPTS:
As a convenience due to the location of package.json, I have added a custom mix task (./lib/mix/npm.ex) which allows the execution of npm run scripts from the project root using mix: mix npm build, mix npm watch, etc.

USAGE

INITIAL SETUP:

  • $ cd assets
  • $ npm install (Gets npm dependencies)
  • $ elm-package install (Gets Elm dependencies)
  • $ cd ..
  • $ mix deps.get (Gets Phoenix dependencies)
  • $ mix ecto.create (Sets up database)

TO RUN:

elm-phoenix-example's People

Contributors

ronanyeah avatar

Watchers

Carl Price avatar

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.