dowjones / gulp-bundle-assets

Create static asset (js, css) bundles from a config file: a common interface to combining, minifying, revisioning and more
MIT License
133 stars 36 forks source link

add `pathPrefix` to bundle config #60

Open chmontgomery opened 9 years ago

chmontgomery commented 9 years ago

Currently, you can define the pathPrefix for your url paths as an option to bundle.results. This applies to all bundles. Ideally, we should be able to be more granular by defining a pathPrefix option to each bundle individually, e.g.

// bundle.config.js
module.exports = {
  bundle: {
    main: {
      scripts: [
        './content/**/*.js'
      ],
      styles: [
        './content/**/*.css'
      ],
      options: {
        pathPrefix: { // {(string|object)}
          scripts: '//ecd.akamai.net',
          styles: '//a2b1.akamaihd.net'
        }
      }
    }
  }
}
chmontgomery commented 9 years ago

note: related to https://github.com/dowjones/gulp-bundle-assets/issues/22