Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/tornqvist/jazzon-import

Plugin for jazzon to import other files
https://github.com/tornqvist/jazzon-import

Last synced: about 1 month ago
JSON representation

Plugin for jazzon to import other files

Awesome Lists containing this project

README

        

# jazzon-import

> Plugin for jazzon to import other files

## Usage

The plugin requires option `from` to know where to look for files.

```javascript
let jazzon = require('jazzon');
let importer = require('jazzon-import');
let json = { foo: '@{ import(foo.json) }' };

jazzon
.use(importer({ from: __dirname }))
.compile(json)
.then((result) => {
console.log(result); // => { "foo": }
});
```

## TODO
- [ ] Support importing JavaScript files
- [ ] Explore using relative paths