Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add recommended main field to bower.json to help build tools find the source. #1516

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

Closed
wants to merge 1 commit into from

Conversation

fson
Copy link

@fson fson commented Feb 17, 2014

This makes it possible for build tools such as Webpack to resolve the package using bower.json.

bower.json specification recommends adding this field.

Also removed bower.json from the ignore list in bower.json,
to prevent it from being removed when the package is installed,
so it can be used for this purpose.

…he source.

This makes it possible for build tools such as
[Webpack](https://github.com/webpack/webpack)
to [resolve the package using bower.json.](webpack/webpack#143 (comment))

[bower.json specification](https://github.com/bower/bower.json-spec#main) recommends adding this field.

Also removed bower.json from the ignore list in bower.json,
to prevent it from being removed when the package is installed,
so it can be used for this purpose.
@samiconductor
Copy link

+1 grunt-bower-install needs this as well. Thanks for the PR @fson!

@timmywil
Copy link
Member

I think it might be better to only add this property in tagged commits where the distributed files are present.

@josh
Copy link

josh commented Feb 18, 2014

@timmywil I think thats fine, but it looks like some tags are missing the directive.

See 2.1.0. https://github.com/jquery/jquery/blob/2.1.0/bower.json

Just for reference, the jquery bower package was pointing to https://github.com/components/jquery. This is how the previous json file was configured: https://github.com/components/jquery/blob/master/bower.json

@timmywil
Copy link
Member

You're right, they are currently missing the main property, but I'd like to see the addition in the release script. I'm working on this.

@timmywil timmywil closed this in 027d470 Feb 19, 2014
timmywil added a commit that referenced this pull request Feb 19, 2014
… property

Fixes #14798
Close gh-1516
Ref gh-1338

Conflicts:
	bower.json
@timmywil
Copy link
Member

Tags 1.11.0 and 2.1.0 should now be fixed.

@josh
Copy link

josh commented Feb 19, 2014

Thank you!

@josh
Copy link

josh commented Feb 19, 2014

O, no, another problem. I don't think you wanted to ignore bower.json from itself.

https://github.com/jquery/jquery/blob/master/bower.json#L15

When you bower install the package, the bower.json is never written out for tools to even read the main property from.

@timmywil
Copy link
Member

You're right! I meant to do that. One second.

timmywil added a commit that referenced this pull request Feb 19, 2014
timmywil added a commit that referenced this pull request Feb 19, 2014
@timmywil
Copy link
Member

Done.

@josh
Copy link

josh commented Feb 19, 2014

Working great. Thanks again @timmywil

@timmywil
Copy link
Member

Glad it's working. Thanks for confirming for me.

pib pushed a commit to pib/jquery that referenced this pull request Apr 29, 2014
pib pushed a commit to pib/jquery that referenced this pull request Apr 29, 2014
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants