How do I rename the cwd, base and path in the gulp stream, to save as I need it?

157 views Asked by At

I have a gulp.src stream with files:

file.cwd         file.base                                         file.path
D:\Projects\test D:\Projects\test\public\app\                      D:\Projects\test\public\app\bootstrap-8843d1ff.js
D:\Projects\test D:\Projects\test\public\app\contacts\views\index\ D:\Projects\test\public\app\contacts\views\index\contacts-4173bf62.js
D:\Projects\test D:\Projects\test\public\app\homepage\views\index\ D:\Projects\test\public\app\homepage\views\index\homepage-1eb3581b.js
D:\Projects\test D:\Projects\test\public\app\user\resources\       D:\Projects\test\public\app\user\resources\user-f75d774a.js
D:\Projects\test D:\Projects\test\public\                          D:\Projects\test\public\index.html

I want save files as:

gulp.dest('test\build') ->
test\build\app\bootstrap-8843d1ff.js
test\build\app\contacts-4173bf62.js
test\build\app\homepage-1eb3581b.js
test\build\app\user-f75d774a.js
test\build\index.html

How do I rename the cwd, base and path in the stream, to save as I need it?

1

There are 1 answers

0
tamtakoe On
file.cwd         file.base                file.path
D:\Projects\test D:\Projects\test\public\ D:\Projects\test\public\app\bootstrap-8843d1ff.js
D:\Projects\test D:\Projects\test\public\ D:\Projects\test\public\app\contacts-4173bf62.js
D:\Projects\test D:\Projects\test\public\ D:\Projects\test\public\app\homepage-1eb3581b.js
D:\Projects\test D:\Projects\test\public\ D:\Projects\test\public\app\user-f75d774a.js
D:\Projects\test D:\Projects\test\public\ D:\Projects\test\public\index.html