 mainBowerFiles =   require 'main-bower-files'
 lazypipe =         require 'lazypipe'
 es =               require 'event-stream'
+exec =             require('child_process').exec
 
 bower =            require './bower'
+
+execute = (command, callback) ->
+  exec command, (error, stdout) ->
+    callback(stdout)
 
 htmlminOpts =
   removeComments: true

    .pipe(gulpFilter('**/*.js'))
    .pipe(gulp.dest('./target/client/tmp/client/statics/vendors/js'))

  gulp.src('./src/main/client/index.html')
    .pipe(gulpInject(gulp.src('./target/client/tmp/client/statics/vendors/css/bootstrap.css'), {ignorePath: ['target/client/tmp/client'], starttag: '<!-- inject:bootstrap:{{ext}} -->'}))
    .pipe(gulpInject(es.merge(jsVendorFiles, cssVendorFiles), {ignorePath: ['target/client/tmp/client'], starttag: '<!-- inject:vendor:{{ext}} -->'}))
    .pipe(gulpInject(es.merge(appFiles(), cssFiles()), {ignorePath: ['target/client/tmp/client', 'src/main/client']}))
    .pipe(gulp.dest('./target/client/tmp/client/'))


gulp.task 'templates', () ->

gulpInject =       require 'gulp-inject'
gulpMocha =        require 'gulp-mocha'
gulpRename =       require 'gulp-rename'
gulpReplace =      require 'gulp-replace'
gulpHtmlmin =      require 'gulp-htmlmin'
gulpServe =        require 'gulp-serve'
gulpNodemon =      require 'gulp-nodemon'
