eduardoboucas / eduardoboucas/static-api-generator
Add warning / error when something else than YAML is passed
- Dominant language
- JavaScript
- Stars
- 148
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
I wanted to try the generator API so I installed it: `npm i static-api-generator`
I created a generator for my JSON data:
```javascript
const API = require('static-api-generator');
const api = new API({
addIdToFiles: true,
blueprint: 'data/:page/:category',
outputPath: 'temp/api/',
pluralise: false
});
api.generate({
endpoints: ['page', 'category']
});
```
then run it: `node script.js`.
And the result is that I have one char per entry:

And if I put `addIdToFiles` to `false` I have the whole content as one string

So it's like newline terminator are not properly detected.
I'm running it under archlinux with LN (`\n`) as final newline and utf-8 as charset. And I'm using node v10.0.0. All data files are JSON.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.