fzaninotto / DependencyWheel

A package dependency visualization using d3.js. Currently supports Composer for PHP.
http://www.redotheweb.com/DependencyWheel/
MIT License
264 stars 155 forks source link

Added Madge Builder to graph commonJS/AMD dependencies. #4

Open pixeldrew opened 10 years ago

pixeldrew commented 10 years ago

Added npm package.json for distribution with npm. Created a build file to minify clientlib. Renamed js to lib to match npm BP. Updated index to show Madge graph.

fzaninotto commented 10 years ago

Sorry, I can't even review this PR. Please submit only atomic changes. Your PR mixes minification (which I don't need), package.json (why not), madge (why not). You should split it into separate PRs.

pixeldrew commented 10 years ago

The minification is added as process of npm packaging. If you do not wish to add minification as part of npm's publishing process then by all means remove it.

pixeldrew commented 10 years ago

I'll add the madgeBuilder as a separate PR. The package.json automates minification via the build.js script using the npm package command.

pixeldrew commented 10 years ago

I moved the javascript to the lib folder to closer match to NPM best practice, this makes it difficult to give you atomic PR's.

The overall reason for this PR was so that DependencyWheel could be included into Cloudflare's JS CDN https://github.com/cdnjs/cdnjs. The package.json file includes the npmFile Map attribute that points to a built (dist) version of the library- only the files listed here are added to the CDN. Cloudflare has a requirement for minification, so I built that as part of the npm packaging process which makes it automated. All you should need to do to submit this package to npm is, after the package.json file has been merged to run the following commands:

npm install -d && npm adduser && npm package