/**
 * Created by liangwensen on 1/25/16.
 */
var gulp = require('gulp');
var concat = require('gulp-concat');
var path = require('path');

gulp.task('concat', ['copy'], function () {
    gulp.src([
            path.resolve(__dirname, '../node_modules/jquery/dist/jquery.min.js'),
            path.resolve(__dirname, '../node_modules/metro-ui/build/js/metro.min.js'),
            path.resolve(__dirname, '../node_modules/d3/d3.min.js'),
            path.resolve(__dirname, '../node_modules/dagre-d3/dist/dagre-d3.min.js'),
        ])
        .pipe(concat('libs.js'))
        .pipe(gulp.dest(path.resolve(__dirname, '../theme/dist/')));
    gulp.src([
            path.resolve(__dirname, '../node_modules/metro-ui/build/css/metro.min.css'),
            path.resolve(__dirname, '../node_modules/metro-ui/build/css/metro-icons.min.css'),
            path.resolve(__dirname, '../node_modules/metro-ui/build/css/metro-responsive.min.css'),
            path.resolve(__dirname, '../node_modules/metro-ui/build/css/metro-rtl.min.css'),
            path.resolve(__dirname, '../node_modules/metro-ui/build/css/metro-schemes.min.css'),
        ])
        .pipe(concat('all.css'))
        .pipe(gulp.dest(path.resolve(__dirname, '../theme/dist/metro-ui')));
    gulp.src([
            path.resolve(__dirname, '../node_modules/toc-generator/dist/toc-generator.css'),
        ])
        .pipe(concat('libs.css'))
        .pipe(gulp.dest(path.resolve(__dirname, '../theme/dist/')));
});
