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

Did not specify a main file #22

Open
pyronaur opened this issue Jul 6, 2013 · 1 comment
Open

Did not specify a main file #22

pyronaur opened this issue Jul 6, 2013 · 1 comment

Comments

@pyronaur
Copy link

pyronaur commented Jul 6, 2013

I'm seeing this happens to a lot of bower packages. Is there a way around it ?

Running "bowerful:default" (bowerful) task
>> imagesloaded already installed. Skipping.
>> jquery-colorbox already installed. Skipping.
>> jquery-easing already installed. Skipping.
>> jquery.cookie already installed. Skipping.
>> modernizr already installed. Skipping.
>> packery already installed. Skipping.
>> underscore already installed. Skipping.
>> Package modernizr did not specify a `main` file in components.json.
>> Trying `package.json`
Warning: Unable to read "assets/bower/modernizr/package.json" file (Error code: ENOENT). Use --force to continue.

Aborted due to warnings.
@gyllstromk
Copy link
Owner

The aborting warning is a bug and I'll fix it.

The main problem is due to the lack of standardization and quality control in the bower repo system. Since the post-download portion of grunt-bowerful concatenates files, it needs to know which ones are relevant to the package (i.e. which to include). This should be indicated in the bower.json/component.json file, but there is no requirement for bower packages to list this. In fact some packages, such as the ember one, won't even work without using Ruby's rake program to build files :-o

There are some hackish heuristics in the code, such as checking the package.json file (which should be used exclusively for node) or using a .js file matching the package name, but these are stabs in the dark. If you notice anything in these packages that can be used alternatively, let me know via an issue and I'll try to incorporate that here.

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

2 participants