gulp-cmsref
v0.1.0
Published
A gulp plugin to replace file name references with FirstSpirit compatible $CNS_REF-tags
Downloads
1
Maintainers
Readme
Gulp plugin to replace all media occurrences in CSS files with FirstSpirit CMS_REF tags:
url("../path/to/image-filename.jpg") → url("$CMS_REF(media:"image_filename")$")
The generated reference name is essentially the filename without extension and with all special chars replaced with underlines. A mapping object with filenames (not paths!) as keys and reference names as values can also be passed to the plugin:
cmsref({
"image-filename.jpg": "my_image_jpg"
})