Grunt-es-dependency-graph -


BSD
跨平台
JavaScript

软件简介

Grunt-es-dependency-graph 能够在ES6 模块文件中生成具有依存关系树的
JSON 文件。

代码示例:

grunt.initConfig({
  depGraph: {
    production: {
      options: {
        includeBindings: true,
        moduleName: function (importPath, modulePath) {
          return path.join(path.dirname(modulePath), importPath);
        }
      },
      src: ['src/*.js'],
      dest: 'dist/dependencies.json'
    }
  }
});