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

Add ignore option for tracking bower components. #19

Closed
jzaefferer opened this issue Jun 18, 2014 · 7 comments
Closed

Add ignore option for tracking bower components. #19

jzaefferer opened this issue Jun 18, 2014 · 7 comments
Labels

Comments

@jzaefferer
Copy link
Contributor

For jQuery UI we need to install a specific jQuery version, while we want to defined the dependency itself as ">=1.6". Since bower install <endpoint> also installs all project dependencies, the simplest solution for us would be to tell this module which install command to run, to add jquery#<2.

See also jquery/jquery-ui#1271

@rxaviers
Copy link

For clarity... @jzaefferer, please correct me if I'm wrong. jQuery UI needs different jQuery versions for production vs. development. On production, it's >=1.6. But on development, it's <2. Currently, bower ignores different versions of the same package on dependencies vs. devDependencies. It simply uses dependencies (the production version), ignoring the devDependency different version.

I went ahead and opened issue bower/bower#1359 to see what bower people thinks about it. Then, we could decide how to proceed.

@jzaefferer
Copy link
Contributor Author

So bower won't change, so this would still be useful.

@timmywil
Copy link
Owner

Sorry I was MIA yesterday, but I'm a little confused. This seems superfluous. How about giving the different endpoint a different name?

{
  "dependencies": {
    "jquery": ">=1.6"
  },
  "devDependencies": {
    "jquery-1.x": "jquery#<2"
  }
}

@jzaefferer
Copy link
Contributor Author

That would work, but then it leaves me with an untouched endpoint:

>> Could not clean directory. Some bower components are not configured:  [ 'jquery' ]

Thanks to #18 I could work around that by specifying a noop copy:

"xxx": "jquery/whatever",

But that's hardly a proper solution. Is there any way to tell this plugin to ignore a component? The report does nothing for me in this case.

@jzaefferer
Copy link
Contributor Author

Looks like the report option is ignored when clean: true is set, which we use.

@timmywil
Copy link
Owner

I like the ignore idea. I'll try to put something together tomorrow.

@timmywil
Copy link
Owner

FYI, the report option is like the little brother of clean. They report the same thing. If clean is true, report need not be set. If clean is false, one can choose to see the list of unused modules or not by setting report.

@timmywil timmywil changed the title Allow custom bower-install command Add ignore option for tracking bower components. Jun 23, 2014
jzaefferer added a commit to jzaefferer/grunt-bowercopy that referenced this issue Jun 23, 2014
jzaefferer added a commit to jzaefferer/grunt-bowercopy that referenced this issue Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants