Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing bower dependancies for the project #122

Open
trsteel88 opened this issue Jan 23, 2015 · 2 comments
Open

Installing bower dependancies for the project #122

trsteel88 opened this issue Jan 23, 2015 · 2 comments

Comments

@trsteel88
Copy link

Is there a way to install bower dependancies that aren't inside a bundle? e.g, I want to install from app/Resources/config/bower.json as well as my bundles.

@Spea
Copy link
Owner

Spea commented Jan 25, 2015

You could adjust the config_dir for the bundle configuration (see configuration reference for more information). But sadly you still have to use some bundle for it. So currently there is no "nice way" to define the location not tied to a bundle

@giosh94mhz
Copy link

@trsteel88 I'm a bit late, but here's how I've done to have a "standard" bower configuration:

sp_bower:
    bundles:
        AcmeDemoBundle: # well, a placeholder actually
            config_dir: %kernel.root_dir%/config        # symfony app standard
            asset_dir:  %kernel.root_dir%/../web/vendor # standard-ish
            cache:      %kernel.cache_dir%              # symfony standard

and then in the symfony project root, I've added the following .bowerrc (should match your config above):

{
    "cwd": "app\/config\/",
    "directory":"..\/..\/web\/vendor\/"
}

Now you can use the same configuration from command line.

@Spea Sorry if I go off-topic, but why isn't this configuration the default? I have previous experience with both Symfony (2+ years) and Bower (half a year), but the current configuration scheme puzzled me. Why are the configuration split in bundles sections (other than distributing bower.json in a bundle)? Should I file a DX issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants