https://github.com/lgdd/generator-liferay-elm
👾 Yeoman generator for creating Liferay projects with Elm. Examples: https://github.com/lgdd/liferay-elm-examples
https://github.com/lgdd/generator-liferay-elm
elm liferay yeoman-generator
Last synced: 3 months ago
JSON representation
👾 Yeoman generator for creating Liferay projects with Elm. Examples: https://github.com/lgdd/liferay-elm-examples
- Host: GitHub
- URL: https://github.com/lgdd/generator-liferay-elm
- Owner: lgdd
- License: other
- Created: 2020-03-15T00:14:35.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-14T18:21:30.000Z (4 months ago)
- Last Synced: 2025-02-19T11:48:28.802Z (3 months ago)
- Topics: elm, liferay, yeoman-generator
- Language: JavaScript
- Homepage:
- Size: 1.08 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Liferay Elm Generator [](https://badge.fury.io/js/generator-liferay-elm) [](https://travis-ci.org/lgdd/generator-liferay-elm) [](https://renovatebot.com/)
A Yeoman generator for creating Liferay Elm projects, using the amazing [Create Elm App](https://github.com/halfzebra/create-elm-app) for a fast and easy development with no build configuration. To create a build for Liferay, it uses the `liferay-npm-bundler` from the very useful [Liferay JS Toolkit](https://github.com/liferay/liferay-js-toolkit#readme).
- [Installation](#installation)
- [Getting started](#getting-started)
- [Examples](#examples)
- [Trying it locally](#trying-it-locally)
- [What is Elm?](#what-is-elm)## Installation
__Node >=10__ is required for installation.
First, install [Yeoman](http://yeoman.io) and generator-liferay-elm using [npm](https://www.npmjs.com/) (assuming you have pre-installed [node.js](https://nodejs.org/)).
```bash
npm install -g yo generator-liferay-elm
```Then generate your new project:
```bash
yo liferay-elm
```> You can also try it locally by cloning the repo and running `npm link` inside the project.
## Getting started
Once the project generated:
```bash
cd my-elm-project
yarn start
```
> Where `my-elm-project` is the default name provided by the generator.
> Change it accordingly to the name you choose.If you choose the pre-configured Liferay Docker environment, you might want to start it with:
```bash
docker-compose up -d
```Build your app for Liferay:
```bash
yarn build:liferay
```Deploy your app to Liferay:
```bash
yarn deploy:liferay
```Run tests:
```bash
yarn test
# or in watch mode
yarn test --watch
```
> The first time, you might see this message: `INFO: Running elmi-to-json for the first time; downloading the actual binary`. Simply run the command again.Install a new [package](https://package.elm-lang.org/) (e.g. `elm/svg`):
```bash
yarn run elm-install elm/svg
```This generator gives you scripts that are aliases to the one provided by Create Elm App (e.g. `yarn start` for `elm-app start`).
To learn more about the tasks available for your project, directly checkout this [guide](https://github.com/halfzebra/create-elm-app/blob/master/template/README.md).## Trying it locally
If you to try this generator on your local machine, feel free to clone this repo and run the following commands:
```bash
# install dependencies:
yarn
# make it available for yeoman:
npm link
```## Examples
If you want to see and try some examples, checkout this dedicated repository: https://github.com/lgdd/liferay-elm-examples.
## What is Elm?
As the [official site](https://elm-lang.org/) states, Elm is __a delightful language for reliable webapps__. How? By providing features such as:
- No Runtime Exceptions
- Great Performance
- Enforced Semantic Versioning
- Small Assets
- JavaScript InteropThe best way to learn Elm is to follow the [official guide](https://guide.elm-lang.org/).
You can try Elm with this [online editor](https://elm-lang.org/try).You can also checkout this non-exhaustive list of nice talks about Elm:
- [Why Elm?](https://www.youtube.com/watch?v=rU-W6557Dos)
- [Elm crash course - Building unbreakable webapps fast](https://www.youtube.com/watch?v=kEitFAY7Gc8)
- [Developer Happiness on the Front End with Elm](https://www.youtube.com/watch?v=kuOCx0QeQ5c)
- [Building UIs in the Dark](https://www.youtube.com/watch?v=sKxEwjKQ5zg)
- [Scaling Elm Apps](https://www.youtube.com/watch?v=DoA4Txr4GUs)
- [The life of a file](https://www.youtube.com/watch?v=XpDsk374LDE)## License
[LGPL-3.0](LICENSE)