hearsayit / HearsayRequireJSBundle

RequireJS integration for Symfony2.
130 stars 55 forks source link

assetic:dump --watch keeps generating files #45

Closed samvdb closed 11 years ago

samvdb commented 11 years ago

Hi,

I am using the latest master build of RequireJSBundle and when using i noticed existing files are not removed and new files keep generating untill the "unable to write" exception is thrown.

php app/console assetic:dump --watch

File example:

10:05:28 [file+]     /web/symfony.coremanager.dev/app/../web/js/general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_1_general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_1_1.js
[error] Unable to write file /web/symfony.coremanager.dev/app/../web/js/general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_1_general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_general_part_1_general_part_1_1_general_part_1_general_part_1_1_1_1_1.js

Im guessing something is wrong in the Assetic loader?

my config:

# RequireJS configuration
hearsay_require_js:
    base_url:            "js"
    base_dir:            "%kernel.root_dir%/../web/js"
    paths:
        jquery:            "%kernel.root_dir%/Resources/public/js/jquery"
        datatable_plugin:  "@MyBundle/Resources/public/js/datatables/plugins"
        datatable:         "%kernel.root_dir%/Resources/components/datatables/media/js/jquery.dataTables"
    shim:
        datatable:
            deps: ['jquery']
samvdb commented 11 years ago

Found the problem. My config has the following error creating an infinite loop:

WRONG

base_dir:            "%kernel.root_dir%/../web/js"

CORRECT

base_dir:            "%kernel.root_dir%/Resources/public/js"