lucalanca / grunt-angular-architecture-graph

Generate modules dependencies graph in .dot format
MIT License
190 stars 13 forks source link

Nothing is built no errors #18

Closed mladenp closed 9 years ago

mladenp commented 9 years ago

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.

lucalanca commented 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 ?

mladenp commented 9 years ago

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?

lucalanca commented 9 years ago

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?

mladenp commented 9 years ago

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.

lucalanca commented 9 years ago

This is definitely weird. Can you write an example of your module so I can try to reproduce this error?

mladenp commented 9 years ago

Here it is: http://pastebin.com/KbjJcJEq I tried some other files but still nothing.

lucalanca commented 9 years ago

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:

all

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?

mladenp commented 9 years ago

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:

lucalanca commented 9 years ago

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)

mladenp commented 9 years ago

Yup on Windows, i am assuming it needs full path so that graphviz can access it correctly.