Closed mladenp closed 9 years ago
Can you share your whole grunt-angular-architecture-graph configuration? It should look like:
angular_architecture_graph: {
diagram: {
files: {
"architecture": [
"<%= projectConfig.app %>/<%= projectConfig.project %>/**/*.js"
]
}
}
}
Also, are you running grunt angular-architecture-graph
?
Ah, thanks, i forgot to register it as default task. Now it creates folder and files but all.png and modules.png are empty images?
Are these the only images that appear empty? Do you have any images being created for each module?
If not, are you sure you're pointing to the right file?
Yes, there is generic legend.png file thats ok and there are dot files inside dot folder. I am pointing it to one file with one module inside. The file is JSHinted without any errors. Graphviz is working fine from command line.
This is definitely weird. Can you write an example of your module so I can try to reproduce this error?
Here it is: http://pastebin.com/KbjJcJEq I tried some other files but still nothing.
Downloaded this file and added as tests to this repo. You can see it in example
branch. The specific configuration is in https://github.com/lucalanca/grunt-angular-architecture-graph/blob/example/grunt/angular_architecture_graph.js#L21
I got no problems and one of the generated diagrams is all.png like follows:
Don't know really know what are you doing wrong, but my guess would be the configurations. Make sure that you the configurations as in the link I put at the top. Can you also run the task with the -v
option (which adds the verbose mode) so we can debug it better?
Ah, i was stupid i should have added full path to my angular files. You may want to mention that in readme, projectConfig.app is a little confusing, mention that full path to .js file is required (like C:/Users/Mladen/Mirage/www/js/app.js)
btw this is awesome stuff :+1:
Glad I could help.
Usually I can pass the path starting from the root of the project (where Gruntfile.js lies). Is this a windows thing? (I run OSX)
Yup on Windows, i am assuming it needs full path so that graphviz can access it correctly.
I installed graphviz on my Windows and added it PATH. Installed grunt-graphviz and grunt-angular-architecture-graph. I added: "architecture": [ "/www/js/app.js" ] and:
grunt.loadNpmTasks('grunt-angular-architecture-graph');
But when i run grunt nothing happens, it doesn't put anything inside architecture folder.