hearsayit / HearsayRequireJSBundle

RequireJS integration for Symfony2.
130 stars 55 forks source link

Support of Symfony bundles in paths #62

Closed km256 closed 10 years ago

km256 commented 10 years ago

Some assets could not be in a place indicated in baseUrl. This should be taken into consideration while receiving module name from asset. If an original file is not in a place indicated in baseUrl, it means the path to the file can be found in 'paths'. That's where the name of the module can be taken of.

km256 commented 10 years ago

example configuration:

base_dir: "%kernel.root_dir%/Resources/public/js"
paths:
  someBundle: "@someBundle/Resources/public/js"
optimizer:
  modules: 
    -
      name: common
      include:
        - some/common/module
    -
      name: pages/somePage
      exclude: [common]
    - 
      name: someBundle/pages/someBundlePage
      exclude: [common]
apsavin commented 10 years ago

@IgorTimoshenko what do you think about this pull request?

jifeon commented 10 years ago

@IgorTimoshenko can we do something for this pull request to be applied? Without it our pages from bundles weights too much, it's not acceptable for production ;( We don't want to use forks of vendors code not to break further compatibility. Thanks for the understanding.

apsavin commented 10 years ago

@IgorTimoshenko something else?

ihortymoshenko commented 10 years ago

@apsavin, yes, unit tests :)