Tools for AMD standard. check module legal, find dependency etc.
npm install amdlibjavascript
npm install -g amdlib
`API
* -b --basePath : specify the base path of the module dependency
* -t --tree : print the dependency details as a tree format
* -h --help : print help docHow to use
$3
A test file called toto.js
`javascript
amdlib -b "path/to/" -t toto.js
`$3
`javascript
var amdlib = require('../index.js');
var treeify = require('treeify');amdlib.config({
basePath: __dirname + '/demo/'
})
var treedp = amdlib.getDependency('entry', true);
var flatdp = amdlib.simpleDependency('entry');
console.log(treeify.asTree(treedp, true));
console.log(treeify.asTree(flatdp, true));
``