'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
  pattern: ['gulp-*', 'main-bower-files', 'uglify-save-license']
});

var replace = require('gulp-replace');

gulp.task('thymeleaf',['build'], function () {
  return gulp.src('dist/*.html')
    .pipe(replace('src="scripts/', 'th:src="@{scripts/'))
    .pipe(replace('.js">', '.js}">'))
    .pipe(replace('href="styles/', 'th:href="@{styles/'))
    .pipe(replace('.css">', '.css}"/>'))
    .pipe(gulp.dest('dist'));
});

gulp.task('copystatic',['thymeleaf'], function () {
  return gulp.src(
		['dist/**/*.js'
		,'dist/**/*.css'
		,'dist/**/*.png'
		, 'dist/**/*.svg'
		, 'dist/**/*.eot'
		, 'dist/**/*.ttf'
		, 'dist/**/*.woff'])
  .pipe(gulp.dest('../zols-cms-plugin/src/main/resources/static'));
});

gulp.task('copytemplates',['thymeleaf'], function () {
  return gulp.src(['dist/**/*.html'
		//,'!dist/index.html'
		])
  .pipe(gulp.dest('../zols-cms-plugin/src/main/resources/zolstemplates'));
});

gulp.task('release', ['copystatic', 'copytemplates']);

@@ -484,32 +484,244 @@
 st('dist'));%0A%7D);
+%0Agulp.task('css_font_fix', function () %7B%0A  return gulp.src('dist/**/*.css')%0A    .pipe(replace('../bower_components/bootstrap-sass-official/assets/fonts/bootstrap/', '../fonts/'))%0A    .pipe(gulp.dest('dist'));%0A%7D);
 %0A%0Agulp.task('cop
@@ -733,32 +733,47 @@
 ic',%5B'thymeleaf'
+,'css_font_fix'
 %5D, function () %7B
@@ -1255,12 +1255,28 @@
 mplates'
+, 'css_font_fix'
 %5D);%0A

fix css on release task