E
E
Evreke2015-11-27 00:21:39
npm
Evreke, 2015-11-27 00:21:39

How to make automatic replacement of paths after compilation by the collector?

At the root of my project there are directories
app // Root
├───mixins
└───modules //directory for the main files main.scss and index.hb, in which other modules are
included ├───block
└───head
When I add links to image files in templates or style files, then the paths to them after compilation do not change and continue to refer to old sources, how to set up an automatic process of changing paths after compiling the project to another folder, let's call it DEV.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Malko, 2015-11-27
@Evreke

Several variants:

  1. indicate the right path immediately;
  2. use path replacement plugins (gulp-replace-path, gulp-assetpaths, etc.);
  3. write a placeholder like =%staticPath%= instead of the path and then change this placeholder using gulp-replace to what you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question