Confit client ##########
This is the Javascript client for the CONFIT Skillbill service
- make your changes
- modify packge.json version
- commit your changes
- build and add dist folder
npm run version
- push
npm run postversion
- publish
npm publish
the package is available here
Using npm:
npm install --save confit-client
Using cdn:
<script src="https://unpkg.com/confit-client/dist/confit-client.iife.min.js"></script>
<script>
// now a Confit object is accessible:
Confit.load({...}).then(...);
</script>
Confit = require('confit-client')
import Confit from 'confit-client';
Confit.load({
repoId: '178474a9-360e-4299-a2e1-e8ae284ce909',
alias: 'test.site.com-fe'
}).then(configuration => {
console.log(configuration);
});
Confit.load({
repoId: '178474a9-360e-4299-a2e1-e8ae284ce909',
repoSecret : 'f18d2da0-5a38-4b2f-8a05-c021cfe48821',
path: 'test/be.json'
}).then(configuration => {
console.log(configuration);
});
It is also possible to create a reusable instance with your defaults to load multiple files:
const confit = Confit.create({
repoId : '178474a9-360e-4299-a2e1-e8ae284ce909',
repoSecret : 'f18d2da0-5a38-4b2f-8a05-c021cfe48821'
});
confit.load({
path: 'globals.json'
}).then(globals => {
console.log(globals);
});
confit.load({
alias: 'be-conf'
}).then(configuration => {
console.log(configuration);
});