Skip to content

EchoFUN/amdlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amdlib

Install

Install the tool from npm registry.

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 doc

How to use

Standalone

A test file called toto.js

amdlib -b "path/to/" -t toto.js

Program API

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));

License

MIT

About

Tools for AMD standard. check module legal, find dependency etc.

Resources

Stars

Watchers

Forks

Packages

No packages published