Web Assets Development utilities
Web Assets comes with development utilities that help with repetitive changes on the project level. Find them in the dev-utils
directory.
Search and replace
Create search and replace map, check with dry-run, and run:
- Create the search and replace map text file. The text file must have the following format:
to-search-example| to-change-example
to-search-string| to-change-string
- Run the script in dry-mode, with
-n
flag. Pass in search and replace map, and directory to process: ./search-and-replace.sh -n search-and-replace-map-example.txt
- If everything looks correct, run the script:
./search-and-replace.sh search-and-replace-map-example.txt
After running the script, check if changes were picked up by Git.