Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0918nobita/rollup-plugin-elm2
Bundle Elm programs with Rollup
https://github.com/0918nobita/rollup-plugin-elm2
elm rollup rollup-plugin
Last synced: 3 months ago
JSON representation
Bundle Elm programs with Rollup
- Host: GitHub
- URL: https://github.com/0918nobita/rollup-plugin-elm2
- Owner: 0918nobita
- License: mit
- Archived: true
- Created: 2020-03-16T11:15:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-06T01:32:11.000Z (over 4 years ago)
- Last Synced: 2024-09-24T21:40:04.063Z (3 months ago)
- Topics: elm, rollup, rollup-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/rollup-plugin-elm2
- Size: 633 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rollup-plugin-elm2
Bundle Elm programs with Rollup
Supported Elm version: 0.19
## Usage
```javascript
import Elm from './Main.Elm';const node = document.getElementById('app');
const app = Elm.Main.init({ node });
```### rollup.config.js
```javascript
import elm from 'rollup-plugin-elm2';const production = !process.env.ROLLUP_WATCH;
export default {
input: 'src/index.js',
output: {
file: 'dist/bundle.js',
format: 'es',
},
plugins: [
elm({
exclude: 'elm-stuff/**',
compiler: {
optimize: production,
debug: !production,
},
}),
],
};
```Check the `/example` 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')
}
}
```