D
D
dannyroot2017-01-24 14:32:53
gulp.js
dannyroot, 2017-01-24 14:32:53

Gulp userref, how to substitute a variable in the path to css / js files in the output html?

I'll try to explain as simply as possible , namely visually
: And if so, how?
e6f4a6b949be414b93b916f32bce0e9e.jpg
f10e6831e30249139f8e13201c786660.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dannyroot, 2017-01-24
@dannyroot

A crutch on a crutch and a crutch drives. But it works.
.pipe(replace(/css(\/[a-z0-9.\/]+\.(css))/gi, '$1'))
.pipe(replace(/(\/[a-z0-9 .\/]+\.(css))/gi, '<?php echo TEMPLATE_PATH ?>/css$1'))
.pipe(replace(/js(\/[a-z0-9.\/]+\ .(js))/gi, '$1'))
.pipe(replace(/(\/[a-z0-9.\/]+\.(js))/gi, '<?php echo TEMPLATE_PATH ?> /js$1'))
By the way, the problem is known.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question