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

Added option to only copy the packages that are declared in bower.json:depedencies #147

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

roy8000
Copy link

@roy8000 roy8000 commented Nov 26, 2014

Hi,

i added a new option "onlyDependencies" so that when "copy" is set to true, it only takes the packages declared in bower.json:depedencies.

For example if you want to use only bootstrap css and fonts but not its javascript, in the old version you could declare something like this in bower.js:

  "exportsOverride": {
    "bootstrap": {
      "css": "dist/css/*.*",
      "fonts": "dist/fonts/*.*"
    }
  }

but it will copy the jquery depedency because bower installs it in bower_components as it's a declared depedency of bootstrap.

so by adding the onlyDependencies property in the task declaration in gruntfile.js:

        bower: {
            install: {
                options: {
                    targetDir: "./wwwroot/lib",
                    layout: "byComponent",
                    onlyDependencies: true,
                    bowerOptions: {
                        production: true
                    }
                }
            }

it'll only install the css and fonts of bootstrap.

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

Successfully merging this pull request may close these issues.

1 participant