Open m-frachet opened 9 years ago
Here is a working example. Let me know if it helps you or if you are still experiencing issues.
Hi,
I believe that, the online demo work fine e.g: http://code.runnable.com/VMlxhH4h9tNkarWi/conga-annotations-hello-world-example-for-node-js-and-congajs. However, when you locally pickup the same code and run it, same issue pop's up. Even though, i just clone this repo and then "npm install && npm test" but all the test failed.
Here're my configuration: node version --> 5.7.0 npm version --> 4.6.1
I just open this issue: https://github.com/jaumard/ecmas-annotations/issues/42
Is there anything wrong?
Hi @stanislaska,
I believe the issue is that the latest version (v1.0.0) needs node 6 in order to work. I just realized that we need to update the minimum engine dependency in package.json as well as the README.
Otherwise, if you can't update node or don't need ES6 support you can try installing v0.1.8 of the module.
Let me know if that helps!
Hi @lampjunkie,
After updating to node v7.10.0, everything work fine. We're waiting for the package.json and README update.
Thanks you a lot. :D
Hi,
I m actually trying to use your library to create my own annotations, but I cant make what I need.
In fact, I have a simple annotation : var Annotation = require('conga-annotations').Annotation;
module.exports = Annotation.extend({
});
And here's my parser : var path = require('path'); var annotations = require('conga-annotations');
// create the registry var registry = new annotations.Registry();
// add annotations to the registry registry.registerAnnotation(path.join(__dirname, 'annotations', 'InjectAnnotation'));
// create the annotation reader var reader = new annotations.Reader(registry);
// parse the annotations from a file reader.parse(path.join(__dirname, 'FileToParse.js'));
// get the annotations var propertyAnnotations = reader.getPropertyAnnotations(); console.log(propertyAnnotations); // loop through and handle the annotations propertyAnnotations.forEach(function (annotation) {
});
When I try to log the _metadata in reader.js line 103, it seems that it' fully empty and giving me this :
{ methods: [], properties: [], fileComment: '/**', path: 'F:\AnnotationLibrary\FileToParse.js' }
Is this a problem with the current version or am I doing it wrong ?