Webpack and Vite plugin exposing Symfony's translations and routing to Elm.
The translations are available through the Trans.<domain>
Elm module and the routing is available through the Routing
Elm module.
For more information see Webpack or Vite specific documentation.
Translations are exposed using the Trans.<domain>
module like following:
import Trans.Messages as Messages
import Trans.Security as Security
displayStuff : Html msg
displayStuff =
div [] [ text Messages.alert_awesome_plugin ]
div [] [ text Security.global_must_have ]
The routing is exposed using the Routing
module like following:
import Http
import Routing
makeHttpCall : Cmd msg
makeHttpCall =
Http.get
{ url = Routing.app_get_this_plugin
, expect = Http.expectString MsgGetThisPlugin
}
See Usage.
elm-symfony-bridge follows semantic versioning. In short the scheme is MAJOR.MINOR.PATCH where
Versions bellow 1.0.0 are considered experimental and breaking changes may occur at any time.
Contributions are welcomed! There are many ways to contribute, and we appreciate all of them. Here are some of the major ones:
master
branch.As a reminder, all contributors are expected to follow our Code of Conduct.
The sources are organized in 3 main folders:
/lib
contains the common js and elm code: src
for the sources and tests
for the elm tests./webpack
contains all the specifics for the webpack plugin./vite
contains all the specifics for the vite plugin.This project uses the following tools for development:
You'll find the following commands useful when hacking on this project:
# install dependencies for the whole workspace
yarn install
# build the common lib and all plugins
yarn build-all
# build the common lib and a specific plugin
yarn build-vite # for vite plugin
yarn build-webpack # for webpack plugin
# you can now use the yarn link feature or
# yarn install the .tgz generated in the plugin folder
elm-symfony-bridge is distributed under the terms of the MIT license.
See LICENSE for details.