From 20e533c814ea1399470e876b9e0b7af52d11a944 Mon Sep 17 00:00:00 2001 From: RomanSteinberg <romanofficial@yandex.ru> Date: Fri, 4 Sep 2015 00:01:01 +0300 Subject: [PATCH] Add twig components copying to gulp --- gulpfile.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 0b07ef70a..71b18ecf5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -59,7 +59,8 @@ var paths = new (function () { js: media + '/js/**/*.js', config: src + '/deploy/phpConfig/**/*', css_components: media + '/components/**/*.css', - js_components: media + '/components/**/*.js' + js_components: media + '/components/**/*.js', + twig_components: media + '/components/**/*.twig' }; @@ -69,7 +70,8 @@ var paths = new (function () { js: stat + '/js/', config: dst + '/application/config/', css_components: stat + '/components/', - js_components: stat + '/components/' + js_components: stat + '/components/', + twig_components: stat + '/components/' }; })(); @@ -91,13 +93,15 @@ var pipes = (function () { var jsPipe = lazypipe() .pipe(options.opt ? uglify : prettify); + var twigPipe = empty; return { css: cssPipe, less: lessPipe, js: jsPipe, css_components: cssPipe, - js_components: jsPipe + js_components: jsPipe, + twig_components: twigPipe } })(); @@ -106,7 +110,8 @@ var ext = { less: '.css', js: '.js', 'css_components': '.css', - 'js_components': '.js' + 'js_components': '.js', + 'twig_components': '.twig' }; @@ -190,6 +195,7 @@ gulp.task('config:copy', function () { gulp.task('components:copy', function () { constructTask(getConfig('css_components')); + constructTask(getConfig('twig_components')); return constructTask(getConfig('js_components')); }); @@ -227,6 +233,7 @@ gulp.task('watch', function (event) { constructWatch(getConfig('js', event.path)); constructWatch(getConfig('css_components', event.path)); constructWatch(getConfig('js_components', event.path)); + constructWatch(getConfig('twig_components', event.path)); }); -- GitLab