You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
sxml-loader
|
|
|
|
===========
|
|
|
|
[![Build Status](http://drone.vilor.one/api/badges/vilor/sxml-loader/status.svg)](http://drone.vilor.one/vilor/sxml-loader)
|
|
|
|
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
|
|
|
|
|
|
|
|
<div align="center">
|
|
|
|
<img width="100" height="100" alt="Scheme"
|
|
|
|
src="https://upload.wikimedia.org/wikipedia/commons/3/39/Lambda_lc.svg"/>
|
|
|
|
<img width="100" height="100" alt="Webpack"
|
|
|
|
src="https://raw.githubusercontent.com/webpack/media/master/logo/icon-square-small.svg"/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
Scheme XML loader for webpack.
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
_See the full example in the [example](example) directory._
|
|
|
|
|
|
|
|
**webpack.config.js**:
|
|
|
|
```js
|
|
|
|
module.exports = {
|
|
|
|
module: {
|
|
|
|
// ...
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.sxml$/,
|
|
|
|
use: ['html-loader', 'sxml-loader'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
// ...
|
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
By default SXML will be processed by _Chicken Scheme_
|
|
|
|
with _sxml-serializer_ egg. You can use a different interpreter
|
|
|
|
by setting the loader options.
|
|
|
|
|
|
|
|
GNU Guile example:
|
|
|
|
```js
|
|
|
|
// ...
|
|
|
|
use: [
|
|
|
|
'html-loader',
|
|
|
|
{
|
|
|
|
loader: 'sxml-loader',
|
|
|
|
options: {
|
|
|
|
interpreter: 'guile',
|
|
|
|
flags: ['-c'], // "eval" flag (in Guile case "-c") should be last.
|
|
|
|
|
|
|
|
// SXML_LOADER_CONTENT will be replaced with processing SXML markup.
|
|
|
|
expr: '(use-modules (sxml simple))(sxml->xml SXML_LOADER_CONTENT)',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
// ...
|
|
|
|
```
|
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
GPLv3 or later. See full text in the [COPYING](COPYING) file
|
|
|
|
or in GNU website: https://www.gnu.org/licenses/gpl-3.0-standalone.html
|