S
S
Sergei Makhlenko2018-07-02 02:58:39
Twig
Sergei Makhlenko, 2018-07-02 02:58:39

How to set build date in Gulp in Twig template and transfer to folder?

Hello, straight to the task, now I just copy the twig templates to the folder I need, the task is to automatically enter the date of its assembly into the template and after that copy the template (twig, not assembled html) to the directory with the project. Has anyone faced a similar issue?
Now I do this:

/**
 * Copy Twigs design
 */
gulp.task('design:build', function ()
{
    gulp.src(FilePaths.source.design)
        .pipe(gulp.dest(FilePaths.build.design))
        .pipe(copy())
        .pipe(reload({stream: true}));
});

I would like to do this, in the template specify __BUILD_DATE__ where the build date will be substituted
Template build: {{ __BUILD_DATE__ }}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question