klei / gulp-inject

A javascript, stylesheet and webcomponent injection plugin for Gulp
MIT License
811 stars 93 forks source link

different injection path to find file vs path that is injected #111

Closed labbydev closed 9 years ago

labbydev commented 9 years ago

I'm using this plugin and I really love it when working with the Jekyll configuration that I have setup.

However, I'm working on duplicating the configuration with a Sculpin (https://sculpin.io/) environment. The issue is that I need set a certain path for the Gulpfile to find the CSS and JS to inject (Eg: source/code/css/styles.css), but when it does inject it I need it to change the path to one relative to the final files (code/css/styles.css).

Has this issue come up before? Have you thought of creating variables for separate paths in this kind of instance? Does the plugin accept any arbitrary string or anything that could be helpful to me? Please LMK if you have any advice or can think of a tweak to the plugin to allow this sort of functionality.

joakimbeng commented 9 years ago

Though I don't fully understand what you want to accomplish I do think it's possible by using either of the relative, ignorePath or addPrefix options. I recommend reading the README about those options and the Clarifying injected paths wiki page.