broc
v0.1.2
Published
[](https://badge.fury.io/js/broc) [](https://coveralls.io/github/kimulaco/broc) [
-w, --watch Watch mode
-h, --help Display this message
-v, --version Display version numberAPI
If you want to use with objects instead of output a JSON file, you can use the broc API.
import { generate } from 'broc'
generate('./src').then((blog) => {
console.log(blog)
/**
* {
* posts: {
* meta: {
* id: 'test-01',
* title: 'test-01 title',
* description: 'test-01 description.',
* category: 'code',
* tags: ['Tag 1', 'Tag 2', 'Tag 3'],
* created_at: '2019/10/02'
* updated_at: '2019/10/03'
* },
* body: {
* text: 'test-01\n\nThis is body content.',
* md: '# test-01\n\nThis is body content.',
* html: '<h1>test-01</h1>\n<p>This is body content.</p>\n'
* }
* },
* tags: ['Tag 1', 'Tag 2', 'Tag 3']
* }
*/
})Contributing
Please create an Issue or Pull requests if you have any improvements!
Development
- Use yarn.
- broc is created with TypeScript.
- When you update the functions, update the test.
# Install packages
yarn
# Build TypeScript to JavaScript
yarn dev
yarn build
# Test
yarn test