Bower install takes repo, not specific files basically

I am trying to install some js files through bower. My repo has bower.json with the main property, but the whole repo is installed on the / components, not just the files in dist / custom / dir.

Here is what my bower.rc looks like

{ "name": "jquery-m", "version": "2.0.2mup", "description": "Meetup custom build of jQuery 2.0, used on mobile", "main": [ "./dist/custom/" ], "license": "MIT" } 

Is this supposed to work? I thought you could just specify specific files with your main property.

+4
source share
3 answers

Yes, that is how Bauer should work. The Bower-installer looks like a lighter solution than Grunt to solve the exact requirement you are describing, and you will only get files that need to be deployed.

+3
source

Yes, how Bauer works.

He is always looking for a matching repo tag; if it is not found, it goes with the default branch and loads it.

The only use that I have seen so far for the main property of the bower.json file for integration, for example, using building tools, for example Grunt (there are many other tasks related to conversation, only around Google) and others.

+1
source

This is a common misconception.

As stated in the Bower documentation, the main property is a string / array listing the main endpoints of your package.

Supporting Bower packages (and, possibly, users using the overrides property can use the ignore property, which is an array of paths that are not needed in production that you want to ignore Bower when installing your package.

Example:

 { "name": "stackoverflow", "version": "1.0.0", "ignore": [ "test/**", ".jshintrc" ], "dependencies": { "foo": "~1.1" } } 
0
source

Source: https://habr.com/ru/post/947117/


All Articles