Webpack plugin exposing symfony's translations and routing to elm.
Table of content
Translations are exposed using the
Trans.<domain> module like following:
import Trans.Messages as Messagesimport Trans.Security as SecuritydisplayStuff : Html msgdisplayStuff =div  [ text Messages.alert_awesome_plugin ]div  [ text Security.global_must_have ]
The routing is exposed using the
Routing module like following:
import Httpimport RoutingmakeHttpCall : Cmd msgmakeHttpCall =Http.send MsgGetThisPlugin <|Http.get Routing.app_get_this_pluginpluginDecoder
# NPMnpm install elm-symfony-bridge --save-dev# Yarnyarn add elm-symfony-bridge --dev
The usage example bellow also uses
elm-webpack-loader which you can install with:
# NPMnpm install @symfony/webpack-encore --save-devnpm install elm-webpack-loader --save-dev# Yarnyarn add @symfony/webpack-encore --devyarn add elm-webpack-loader --dev
Setup example with symfony's webpack encore:
const Encore = ;const ElmSymfonyBridgePlugin = ;Encore;moduleexports = Encore;
elm-symfony-bridge follows semantic versioning. In short the scheme is MAJOR.MINOR.PATCH where
- MAJOR is bumped when there is a breaking change,
- MINOR is bumped when a new feature is added in a backward-compatible way,
- PATCH is bumped when a bug is fixed in a backward-compatible way.
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:
- Bug Reports: While we strive for quality software, bugs can happen and we can't fix issues we're not aware of. So please report even if you're not sure about it or just want to ask a question. If anything the issue might indicate that the documentation can still be improved!
- Feature Request: You have a use case not covered by the current api? Want to suggest a change or add something? We'd be glad to read about it and start a discussion to try to find the best possible solution.
- Pull Request: Want to contribute code or documentation? We'd love that! If you need help to get started, GitHub as documentation on pull requests. We use the "fork and pull model" were contributors push changes to their personnal fork and then create pull requests to the main repository. Please make your pull requests against the
As a reminder, all contributors are expected to follow our Code of Conduct.
The sources are organized in 3 main folders:
/the root contains the elm code:
srcfor the sources and
testsfor the elm tests.
/webpackcontains all the specifics for the webpack plugin (you are here).
/parcelcontains all the specifics for the parcel plugin.
This project uses the following tools for development:
You'll find the following commands useful when hacking on this project (assuming you're at the root of the repository and this in this folder):
# build the packagenpm run build# run the tests and doc testsnpm run test# Using a local build in a project using webpackcd webpack && npm install && npm run build && npm pack # build a package.tgzcd path/to/project/using/webpack # go in the root directory of your projectnpm install path/to/package.tgz # install the locally built package# Using a local build in a project using parcelcd parcel && npm install && npm run build && npm pack # build a package.tgzcd path/to/project/using/webpack # go in the root directory of your projectnpm install path/to/package.tgz # install the locally built package
elm-symfony-bridge is distributed under the terms of the MIT license.
See LICENSE for details.