klei / grunt-injector

Inject references to files into other files (think scripts and stylesheets into an html file)
MIT License
106 stars 38 forks source link

Missing functionality when using dynamically built files objects. #16

Closed akupiec closed 5 years ago

akupiec commented 10 years ago

Because of behavior destFile option, destination path prefix can not be set anymore for ex. I have app.js file under path: /client/app/app.js but I want to inject it under: /public/app/app.js

Right now there is ignorePath option with one is equivalent to cwd but I would like to see something like prefixPath as well

options: {
    min: true,
    destFile : 'client/index.jade',
    ignorePath: 'client/',
    prefixPath: 'public/'
},
files: {
    cwd: 'client/',
    src: [
    'app/app.js'
    ]
}

P.S. I would appreciate example in documentation how to properly use dynamically file building, because is not obvious

willpracht commented 9 years ago

+1 for dynamic file building docs.

ptitgraig commented 8 years ago

Hello. I would happily recieve a pull request :)