-
Notifications
You must be signed in to change notification settings - Fork 881
please add bower support so grunt-requirejs can work well #236
Comments
Hi David, I will flag this as a "feature" with hopes someone in the community does it, but it will not be an internal dev task. thanks, |
Hey David, Someone just submitted a composer package file. I did my college attempt at Bower, but kept getting server validation errors on the json file. If you have one that registers, feel free to submit a pull request. thanks, |
bower authors say to wait until the next-gen of bower where registering has changed... |
This seems to work Ok for me if I run:
I'm brand new to Bower, however, but it HAS installed the app framework to bower_components/jqMobi Thanks,
|
Yes, that works. I think what I was getting at with the request is that the output of 'bower list -p jqMobi' would output a 'main' property. This enables grunt-requirejs to know the path to the actual library so that it doesn't have to be hard-wired in by hand....that's my take on it anyway. Eg :
|
Ah I see. Does that need jqMobi to have a package.json (or rather, bower.json as package.json is soon to be deprecated)? Something like : https://github.com/hay/stapes/blob/master/package.json I'm familiar with Composer but Bower is brand new to me! I expect that what I would need to do is fork the repo, add a correct bower.json, and then submit a PR back to AppFramework nee JQMobi. Does that sound about right? |
Just for conversations sake - the name "jqMobi" is gone...kaput...no longer used. Anything done should be "appframework" - I won't accept a PR with "jqmobi" in it. |
Understood @imaffett. The current package in Bower is named jqmobi though, so might be worth contacting them to get it changed or at least aliased |
OK, I have added one of my own little libraries to Bower as a test, and added a bower.json and it all worked as @davidmaxwaterman is looking for:
I've submitted PR #314 which is a very similar thing for the Intel App Framework - hopefully this'll get it up and running with the require.js autoloader in a zero-config stylee :-) Thanks,
|
Going to NYC for devcon5, so I will get this included Friday and add the semver. Thanks! |
I think it is the 'main' property that is important and that still seems to be missing. I'm not totally familiar with the mechanism so I would ask on the #bower channel on freenode IRC to be sure. |
@davidmaxwaterman I'm not sure what you're expecting... My PR includes bower.json which states "main": "appframework.min.js", - see https://github.com/01org/appframework/pull/314/files This will not take effect until the PR is merged, however. |
OK, I was having trouble getting it installed...needed to test using #master or #commitid specifically, else I don't get the correct version (get the latest tag - ie 2.0)...so, it's mostly looking fine, apart from the URL which should be git://, not git@. |
Add Bower configuration so that bower-require can autoload the App framework See intel#236 for a discussion of this. Please note that tags will have to be created following [semver](http://semver.org/) so 2.0.0 should be created (rather than 2.0).
I'm using bowerjs[1] to install jqModi at build time using this line in bower.json 👍
{
...
"dependencies": {
"appframework": "01org/appframework",
...
}
}
This works, but install the whole of the git repo, out of which I have to pick the 'correct' file to use in my code.
Furthermore, I intend to use grunt-requirejs[2] to automatically obtain the above 'correct' file from bower, but this requires more information than bower has :
$ bower list --map
...
"appframework": {
"source": {}
},
...
IINM, it should look more like this one :
...
"peg-0.7.0.min": {
"source": {
"main": "app/lib/peg-0.7.0.min/index.js"
}
},
...
Thanks!
[1] https://github.com/bower/bower
[2] https://github.com/asciidisco/grunt-requirejs
The text was updated successfully, but these errors were encountered: