HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

How to update kevlib.json? #37

Closed skorsky closed 9 years ago

skorsky commented 9 years ago

When I finished the first HelloWorld step and then add the dictionary attribute, this is not found due to missing declaration in kevlib.json.

/**
 * Dictionary attribute named "greetMessage"
 */
dic_greetMessage: null,

I managed to update kevlib.json by deleting it and regenerating everything with 'yo kevoree'.

Is this the recommended way?

maxleiko commented 9 years ago

No, as stated in the tutorial readme, the kevlib.json file is generated by the Grunt task kevoree_genmodel on each install and run processes.

├── kevlib.json        # Your component Kevoree model (generated by the grunt task grunt-kevoree-genmodel)

The command

yo kevoree

is for project generation purposes only. You just have to do it once.
Then the simple fact of running your project with grunt kevoree triggers the task that generates your kevlib.json so you don't have to bother generate it manually.

But you can, if you want, by invoking:

grunt kevoree_genmodel
skorsky commented 9 years ago

Thanks for explanation. In my workspace, kevlib.json was not updated as described with 'grunt kevoree'. Don't know the reason.

maxleiko commented 9 years ago

When you run grunt kevoree there is no triggering of the task kevoree_genmodel that appears in the logs as something like:

╰─➤  grunt kevoree
Running "kevoree" task
10:49:21  ALL    KevoreeLogger    Set logLevel= debug
>> Platform node name: node0
>> Bootstrap script: kevs/main.kevs
10:49:21  DEBUG  NPMResolver      modulesPath= /home/leiko/dev/kevoree-js/library/kevoree-node-javascript/.deploy_units/node0
>> Delete old module: .deploy_units/node0/node_modules/kevoree-node-javascript
>> Starting runtime: v5.2.1
10:49:22  INFO   KevoreeCore      Platform node name: node0
10:49:22  DEBUG  KevoreeCore      Deploy process started...
10:49:22  DEBUG  KevoreeCore      Start 'node0' bootstrapping...
Running "kevoree_genmodel:main" (kevoree_genmodel) task
Package:         org.kevoree.library
TypeDefinition:  JavascriptNode
Version:         5.0.0-SNAPSHOT
DeployUnit:      kevoree-node-javascript
Dictionary:      [ logLevel:STRING ("INFO") ]

Model generation done
Model 'kevlib.json' saved at kevlib.json
maxleiko commented 9 years ago

This is not a log from the HelloWorld project, it is from the kevoree-node-javascript project, but the process is the same in the end :)