Utility to parse Neutronium generated cjson
into javascript object. Used by neutronium-vue.
Vm loader is intendent to load data in design mode when using Neutronium. It is helpful when you design your solution decontected from C# back-end.
import rawVm from '../data/vm'
import { createVM } from 'neutronium-vm-loader'
const vm = createVM(rawVm);
import { Command } from 'neutronium-vm-loader'
function commandListener(commandId, ...commandArguments) {
if (commandId === 12) {
return new Promise( //..
);
}
}
Command.listen(commandListener);
Command listen function is called with the command is as a first paremeter and the arguments which with the command has been called. listen return will be used by as the command result. The command id is set incrementally for each command of a view model.
npm install --save neutronium-vm-loader