Answer the question
In order to leave comments, you need to log in
How to catch the path to the current page?
Hello. There is a project where dust js is used to generate templates and load data onto the page.
There is a structure like this:
папка src
---->папка admin
-------->папка admin-page1
------------>папка dust
---------------->example1.dust
---------------->example2.dust
---------------->example3.dust
------------>index.html
---->папка user
-------->папка user-page1
------------>папка dust
---------------->example1.dust
---------------->example2.dust
---------------->example3.dust
------------>index.html
папка dist
---->папка admin
-------->папка admin-page1
------------>папка js
---------------->templates.js
------------>index.html
---->папка user
-------->папка user-page1
------------>папка js
---------------->templates.js
------------>index.html
gulp.task('dust', function() {
gulp.src('src/**/*.dust')
.pipe(dust())
.pipe(concat('templates.js'))
.pipe(gulp.dest('../dist'));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question