L
L
lorentso2021-08-06 19:51:53
gulp.js
lorentso, 2021-08-06 19:51:53

How to save a copy of the file each time the selected expressions are changed?

I want to ask if there is an extension that makes a copy of the file with each change, but only on the condition that not any changes will be taken into account, but only changes in specially selected lines, characters, or expressions

, for example, I have a source file, I change it and immediately together with a change in the file, I get a copy with the original entry let arr = [1, 2] then I amend it again in the new file and in the same way I create a copy with the previous variation ( let arr = [1, 2, 3] ), and so every time, well, all copies, of course, and the original one ( let arr = [1, 2] ), are saved
let arr = [1, 2]
let arr = [1, 2, 3]


let arr = [1, 2, 3, 4, 5]


It is important that all of the following code is ignored. Suppose the extension would take into account only the first line, or take into account the expression starting with "let arr"
An important condition is that a copy must be saved to the original folder, therefore, you need to take care of renaming.
And yet, if it is impossible to implement such an operation using VS extensions, is it possible to implement this with a script, or by connecting the gulp plugin , if any.
After all, this works as a variation of selective watching, which does not start compilation on each change, but creates a copy of the file when only certain parameters are changed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2021-08-06
@yarkov

Someone invents git with very sophisticated features))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question