0.1.0-1 • Published 9 years ago

angular-modules-graph v0.1.0-1

Weekly downloads
5
License
-
Repository
github
Last release
9 years ago

Dismissed project, use instead https://github.com/lucalanca/angular-architecture-graph

angular-modules-graph

Create a graph of angular module definitions, extracted from grunt-angular-modules-graph

var scripts = [
{
  id: 'file1.js',
  text: "angular.module('TestModule',[])"
},
{ ... }
]

var angularModulesGraph = require('angular-modules-graph')

var res = angularModulesGraph(scripts)

res.angular // fake angular containig graph
res.angular.modulesNames == ['TestModule' , ...]  //list of modules name found
res.angular.modules // modules found
res.angular.modules[0].name == 'TestModule' //module name
res.angular.modules[0].items //untyped array of defined items (controllers, filters, provider, services, ...)
res.angular.modules[0].modules //array of module dependencies 

res.results // array of objects indicating if script evaluation resulted without error
res.results[0].id == 'file1.js'
res.results[0].error == false // true if an error occured during evalution
res.results[0].exception == undefined // exception launched during evaluation