https://github.com/orbitbot/karma-msx-preprocessor
Compile JSX into Mithril render-compatible elements on the fly
https://github.com/orbitbot/karma-msx-preprocessor
Last synced: 5 months ago
JSON representation
Compile JSX into Mithril render-compatible elements on the fly
- Host: GitHub
- URL: https://github.com/orbitbot/karma-msx-preprocessor
- Owner: orbitbot
- License: isc
- Created: 2015-11-17T03:46:32.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-17T05:29:48.000Z (over 10 years ago)
- Last Synced: 2024-04-15T09:11:16.356Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# karma-msx-preprocessor
> Compile JSX into Mithril render-compatible elements on the fly
The plugin uses [MSX](https://github.com/insin/msx) to compile [JSX](http://facebook.github.io/jsx/) into [Mithril](http://lhorie.github.io/mithril/) render-compatible elements for your Karma runs.
## Installation
Run `npm install` in your project root:
```bash
$ npm install karma-msx-preprocessor --save-dev
```
## Configuration
```js
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.js': ['msx']
},
msxPreprocessor: {
// options passed to msx transform, the defaults are
harmony : true,
precompile : true
}
})
}
```
`config.msxPreprocessor` is passed directly as the options to [`msx.transform()`](https://github.com/insin/msx/#module-api). `harmony` and `precompile` are enabled by default.