/**
 * 3. Background & Inline SVG
 */
class Svg extends Task {
  constructor() {
    super('svg');

    this.tasks = [];

    if (config.sprites.svg.length) {
      for (let svgName of config.sprites.svg) {
        let svgConfig = this.getOption(svgName);
        let svgTaskName = this.name + ':' + svgName;

        gulp.task(svgTaskName, () => {
          return gulp.src(config.source.img + '/' + svgName + '/*.svg')
            .pipe($.svgSprite(svgConfig))
            .pipe(gulp.dest(this.dist));
        });

        this.tasks.push(svgTaskName);
      }
    }
  }
  getOption(name) {
    let extensions = (config.styles.ext === 'sass') ? 'scss' : config.styles.ext;

    // generate style
    let render = {};
    render[extensions] = {
      dest: '../../' + config.roots.source + '/' + config.paths.source.css + '/svg/_' + name + '.' + extensions // relative path
    };

    // generate svg
    let mode = {};
    let basePath = (config.styles.ext === 'css') ? '/' : config.sprites.basePath;
    mode[config.sprites.mode] = {
      dest: '.',
      sprite: basePath + config.paths.target.img + '/' + name + '-' + config.sprites.mode + '.svg',
      bust: false, // use `gulp-rev`
      render: render
    };

    return {
      mode: mode
    };
  }
  get deps() {
    return this.tasks;
  }
}

export default Svg;

@@ -495,17 +495,110 @@
 s.dist))
-;
+%0A            .pipe($.if('_*.css', gulp.dest(config.source.css + '/svg'))); // fix mode.css bug
 %0A       
@@ -843,16 +843,73 @@
    dest:
+ (extensions === 'css') ? '_' + name + '.' + extensions :
  '../../
@@ -1017,16 +1017,49 @@
 ive path
+ to mode.dest (mode.css has bug!)
 %0A    %7D;%0A
@@ -1106,151 +1106,101 @@
     
-let basePath = (config.styles.ext === 'css') ? '/' : config.sprites.basePath;%0A    mode%5Bconfig.sprites.mode%5D = %7B%0A      dest: '.',%0A      sprite: 
+mode%5Bconfig.sprites.mode%5D = %7B%0A      dest: '.', // default 'css'%0A      sprite: config.sprites.
 base
@@ -1360,16 +1360,46 @@
 eturn %7B%0A
+      dest: config.workspace,%0A
       mo

fix svg bug for css