docs: function(params){
      var id = this.get('id');
      var basename = this.get('basename');
      var ids = this.get('ids');
      var spriteId = id ? basename + id : basename;
      var imgPath = this.get('imgPath');
  
      this.sprites[spriteId] = mixin(conf, {});
      this.sprites[spriteId]['images'] = {};
      var config = this.get('config');
      //合并全局配置
      mixin(config['global'], this.sprites[spriteId]);
      if (imgPath) {
        var imgDest = imgPath + '/' + spriteId + '-sprite.png';
        this.sprites[spriteId]['filename'] = imgDest;
        var imgCss = imgDest;
        if (this.get('relative')) {
          imgCss = this.get('relative') + '/' + spriteId + '-sprite.png';
          this.sprites[spriteId]['relative'] = imgCss;
        }
  
        var output = this.get('output');
        output[imgCss] = path.join(path.dirname(this.get('file')), imgDest);
      }
  
      var dir = params[PARAMS['direction']];
      if (dir && dir == PARAMS['horizontal']) {
        this.sprites[spriteId]['layout'] = 'horizontal';
      }
  
      if (config[id]) mixin(config[id], this.sprites[spriteId]);
  
      ids[id] = spriteId;
      id++;
      this.set('id', id);
      return spriteId;
    }