docs: function build(filename, argv, hook) {
    // 处理默认值
    argv = argv || {};
    argv.trigger = argv.trigger || defaultTrigger;
    argv.remove = argv.remove || defaultRemove;
    var scopes = {};
    var variants = {};
    var tags = JSON.parse(JSON.stringify(defaultTags));
    var excludeList = defaultExclude.slice();
    var removeList = argv.remove.split(/\s*,\s*/);
    var processors = {};
    var clean = true;
    for (var key in defaultProcessors) {
      processors[key] = defaultProcessors[key];
    }
    // 处理配置文件
    var configFilename = argv.config || '.jdistsrc';
    if (fs.existsSync(configFilename)) {
      var config = JSON.parse(fs.readFileSync(configFilename));
      if (typeof config.clean !== 'undefined') {
        clean = config.clean;
      }
      if (config.exclude instanceof Array) {
        excludeList = excludeList.concat(config.exclude);
      }
      if (config.processors) {
        for (var encoding in config.processors) {
          registerProcessor(encoding, config.processors[encoding]);
        }
      }
      if (config.tags) {
        for (var name in config.tags) {
          tags[name] = config.tags[name];
        }
      }
    }
    else if (configFilename !== '.jdistsrc') {
      console.error(
        colors.red('Config file "%s" not exists.'), configFilename
      );
    }
    if (typeof argv.clean !== 'undefined') {
      clean = argv.clean;
    }
    var content;
    if (argv.fromString) {
      content = filename;
      filename = argv.path || 'none';
    }
    var rootScope = scope.create({
      fromString: argv.fromString,
      content: content,
      clean: clean,
      removeList: removeList,
      excludeList: excludeList,
      filename: filename,
      tags: tags,
      argv: argv,
      env: process.env,
      scopes: scopes,
      variants: variants,
      processors: processors
    });
    if (typeof hook === 'function') {
      hook(rootScope);
    }
    return rootScope.build();
  }