Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamansir/ielm
Smart REPL (or REVL) for Elm v0.18
https://github.com/shamansir/ielm
elm elm-lang repl webgl
Last synced: 4 months ago
JSON representation
Smart REPL (or REVL) for Elm v0.18
- Host: GitHub
- URL: https://github.com/shamansir/ielm
- Owner: shamansir
- Created: 2017-10-09T14:42:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-17T13:31:10.000Z (about 7 years ago)
- Last Synced: 2024-09-30T05:21:32.830Z (4 months ago)
- Topics: elm, elm-lang, repl, webgl
- Language: JavaScript
- Homepage:
- Size: 206 KB
- Stars: 36
- Watchers: 3
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# I, Elm.
[iElm — In action](https://vimeo.com/242822314), video @ vimeo.
## First run
Install Elm globally using `npm install -g elm`.
Then istall [iElm](http://npmjs.com/package/ielm) and [`node-simplehttpserve`](https://www.npmjs.com/package/node-simplehttpserver): `npm install -g ielm node-simplehttpserver`;
Run `ielm` and then open http://localhost:8080 in your browser.
Try entering code from [examples](./examples).
To compile, press Shift+Enter (Keystrokes could be changed or added in next versions).
You may use the local install as well, then run `node ./node_modules/ielm/cli.js` from your project directory.
If you have a copy of `iElm` from Github or elsewhere, you may provide a path to its directory with `path=/path/to/ielm`.
## Clean run
You may run `npm run clean-start` to force cleaning `elm-stuff` in the ouput directory and re-installing even those Elm packages which were already installed.
## Adding a package
Just install additional package to your project, as you usually do it with `elm-package install`.
## Development
The commands described above start the `simplehttpserver` to host the compiled `ielm.js`, so if you want to do some development, you need to start `webpack-dev-server` instead — so just go to the package directory and do `npm run dev-start`.
Adding `local` flag as a parameter allows you to start everything from the local directory instead of some external project. It is appended to `npm run dev-start` by default.
## Building `ielm.js`
Just execute `npm run build` in a package directory.
## CLI
* `npm start` is the same as doing `node ./cli run`.
* `npm run clean-start` is the same as doing `node ./cli clean-run`.
* `npm run dev-start` is the same as doing `node ./cli dev-run local`.
* `npm run clean-dev-start` is the same as doing `node ./cli clean-dev-run local`.
* `npm run build` is the same as doing `node ./cli build`.## Terminology
* _Chunk_ is a callable line of Elm code, an expression; it is not allowed to define such expressions on the top level (i.e. w/o indentation) in a common Elm file, _but_ in case of IElm — it is the only way to actually evaluate this expression;
* _Screen_ combines two concepts in one: a block of code with Elm-style imports, Elm-style definitions and _"Chunks"_, and preview of this code, where all these _chunks_ are evaluated and could be observed and controlled;
* _Cell_ is the result of single _Chunk_ evaluation, i.e. the result of the expression;