Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ulisses-alves/rollup-plugin-elm
Import .elm files as ES6 modules.
https://github.com/ulisses-alves/rollup-plugin-elm
elm rollup rollup-plugin
Last synced: about 2 months ago
JSON representation
Import .elm files as ES6 modules.
- Host: GitHub
- URL: https://github.com/ulisses-alves/rollup-plugin-elm
- Owner: ulisses-alves
- License: mit
- Created: 2017-10-03T08:58:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T05:37:07.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T09:32:41.931Z (2 months ago)
- Topics: elm, rollup, rollup-plugin
- Language: JavaScript
- Size: 96.7 KB
- Stars: 16
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - elm - Compile Elm. (Plugins / Transpilation)
README
# rollup-plugin-elm
Import .elm (Elm 0.19) files as ES6 modules.## Usage
```javascript
import Elm from './App.elm'const root = document.getElementById('app')
const app = Elm.App.init({ node: root })
```### rollup.config.js
```javascript
import elm from 'rollup-plugin-elm'export default {
input: 'src/index.js',
output: {
file: `dist/bundle.js`,
format: 'iife'
},
plugins: [
elm({
exclude: 'elm_stuff/**'
})
]
}
```
Check the __examples/__ folder for a complete example.## Options
```javascript
{
include: [],
exclude: [],
compiler: {
// Enable/Disable compiler optimizations (default: false)
optimize: true,
// Enable/Disable debug mode (default: false)
debug: false,
// Path to Elm executable (default: elm)
pathToElm: path.resolve(__dirname, 'node_modules/elm/bin/elm')
}
}
```## Elm 0.18
Elm 0.18 is supported up to version __1.0.6__ of this package. It can installed by running:
```npm install --save-dev [email protected]```