npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-angular-architecture-graph

v0.2.7

Published

reate graphs of your angular projects using angular-architecture-graph.

Downloads

47

Readme

grunt-angular-architecture-graph Build Status

Create graphs of your angular projects using angular-architecture-graph.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-angular-architecture-graph --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-angular-architecture-graph');

The "angular_architecture_graph" task

OS X

Requirements

if running OS X and using homebrew, simply execute:

 brew install graphviz

Windows 7

Requirements

The windows installer of graphviz: graphviz-X.XX.msi, remember to set the Path and point it to your bin directory. e.g. C:\Program Files (x86)\GraphvizX.XX\bin.

Manjaro 0.8.11 (arch linux)

Requirements

Install via yaourt the graphviz package e.g.: yaourt graphviz.

General

Requirements

Make sure the following grunt packages are installed:

You only need to load the grunt-angular-architecture-graph in your grunt file.

Gruntfile

In your project's Gruntfile, add a section named angular_architecture_graph to the data object passed into grunt.initConfig().

        angular_architecture_graph: {
            diagram: {
                files: {
                    // "PATH/TO/OUTPUT/FILES": ["PATH/TO/YOUR/FILES/*.js"]
                    "architecture": [
                        "<%= projectConfig.app %>/<%= projectConfig.project %>/**/*.js"
                    ]
                }
            }
        }

execute the task and the diagrams will be in the output folder, in this example it is in the folder architecture.

Demos

legend

  • ui-router overview diagram angular-ui/ui-router overview

  • ui-router ui.router.state module angular-ui/ui-router state module

  • ui-bootstrap angular-ui/bootstrap

  • ui-bootstrap ui.bootstrap.tooltip module angular-ui/bootstrap tooltip module

Options

options.hideAngularServices

Type: Boolean Default value: true

A boolean value that shows angular services (e.g. $http, $q) as dependencies when set to false.

hideAngularServices: false

options.shapeModules

Type: String Default value: component

A string value that allows you to change the default shape used for

  • module

nodes.

shapeModules: 'triangle'

options.shapeFactories

Type: String Default value: ellipse

A string value that allows you to change the default shape used for

  • Provider
  • Controller
  • Service
  • Factory
  • Injected Service

nodes.

shapeFactories: 'house'

options.shapeDirectives

Type: String Default value: cds

A string value that allows you to change the default shape used for

  • Filter
  • Directive

nodes.

shapeDirectives: 'trapezium'

Available graphviz shapes are shown here

options.colorScheme

Type: String Default value: paired12

A string value that allows you to change the graph colour scheme. You currently need to choose a scheme with at least 9 colours to ensure that all nodes are coloured. Colour schemes which include white or very pale colours will cause some nodes to be hard to see or appear invisible against the white background

colorScheme: 'set19'

Available graphviz colour schemes are shown here

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

List of Contributors

  • lucalanca (current maintainer)
  • carlo-colombo (initial creator of the project)
  • g1ps

Release History

0.2.6

  • (lucalanca) Moves grunt-graphviz from devDependencies to dependencies.

0.2.5

  • (g1ps) fixes 0.2.4 build break
  • (g1ps) Adds colour scheme as a configuration

0.2.4

  • (g1ps) Separated the legend from the graphs.
  • (g1ps) Added the ability to configure which shapes to use.