An open API service indexing awesome lists of open source software.

https://github.com/kantord/emuto-loader


https://github.com/kantord/emuto-loader

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# emuto-loader

An [emuto](https://kantord.github.io/emuto/) loader for webpack.

## Setup

You need to install emuto and emuto-loader:

*Using yarn*

```
yarn add --dev emuto emuto-loader
```

*Using npm*

```
npm install --save-dev emuto emuto-loader
```

You need to modify your webpack config:
``` javascript
// webpack.config.js
module.exports = {
...
module: {
rules: [{
test: /\.eq$/,
loader: 'emuto-loader' // compiles emuto to JavaScript
}]
}
};
```

You'll now be able to import emuto scripts:

```javascript
// index.js
import GreetUser from './greeting.eq'

console.log(GreetUser({user: "John"}))
```