The Bitfinex client generator is a multi purpose template rendering machine, it's built with the goal of generating bitfinex api clients for multiple programming languages
git clone
npm install
- Prepare a template folder with handlebars templates
- Prepare some data
- Think of an output folder, such as './output/node-test'
- Press the POWER button:
const generate = require('bfx-client-generator')
const data = require('./data-as-object/data.js')
const template = './data-as-object/templates'
const output = './data-as-object/output'
async function business () {
// await the machine to do it's thing
await generate(data, template, output)
console.log(' - OK')
}
business()
-
When the machine finishes running
cd ./output/node-test
and check your beautifuly rendered templates -
Find the example file on the examples folder
There are two examples:
npm run test:watch
# watch out for readFile cache sometimes between test restarts
-
No animals were involved during our tests, see for yourself here
-
Before each test all folders on /output will be deleted.
-
Files on ./output are ignored by .gitignore