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

bower dependency "sofa-q-service" doesn't work as expected #6

Open
knitzie opened this issue Aug 28, 2014 · 4 comments
Open

bower dependency "sofa-q-service" doesn't work as expected #6

knitzie opened this issue Aug 28, 2014 · 4 comments

Comments

@knitzie
Copy link

knitzie commented Aug 28, 2014

Hi guys!

I'm currently building my customized app with the sofa SDK. When installing the sofa-checkout-service and all the dependencies with bower, at first everything is just fine. But in my index.html file an error occours. The sofa-q-service import got the wrong path:

<script src="bower_components/sofa-q-service/dist/sofa.core.js"></script>

At the moment I fix it manually and it works.

@nickjanssen
Copy link
Contributor

Hi @knitzie! What index.html are you referring to? The one from https://github.com/sofa/app ?
Or, did you generate the index.html yourself? I double-checked the NPM and Bower components of sofa-q-service and sofa-checkout-service, but their paths appear intact to me. Could you elaborate and tell me how I can reproduce this issue?

@cburgdorf
Copy link
Member

Hi @knitzie I can't add much to what Nick road except that we install all components via NPM so bower usage isn't battle tested. Apart from that it should work :)

However, a word of caution regarding the checkoutService. This service is full of quirky code that works around limitations of our legacy backend API. It's currently going through a complete rewrite and in the end it should be much easier to adapt it for custom backend APIs. I don't mean to scare you away from it's usage for now just wanted to raise awareness :)

Btw, pretty cool to see you building a custom app on top of sofa!

@cburgdorf
Copy link
Member

As a follow up and totally off-topic, I noticed that you came up with angular wrappers for the bare sofa services here: https://github.com/knitzie/custom-sofa/blob/f3a85b271654f5b9e6b7b3454cfb5c564c98c0a7/app/scripts/factory.js

Thumbs up on figuring out those parts on your own especially as we still lack lots of documentation. I just wanted to let you know that we mean to provide such angular wrappers ourselves but they are hidden in sofa-base which at this point is a huge monolithic mess that we mean to slice into fine grained packages.

Example of the wrapped basketService:
https://github.com/couchcommerce/sofa-base/blob/master/src/services/BasketService.js

If you are interested in contributing such packages we would love to take your contributions. We have a sofa-component-seed that can be used to kick start new sofa component packages.

https://github.com/sofa/sofa-component-seed

Not trying to trick you into extra work but if you like to contribute to sofa that might be a good start :)

@knitzie
Copy link
Author

knitzie commented Aug 29, 2014

First of all: Thanks for the answers and compliments ^^
As you've already seen I've uploaded my custom-sofa app, so you and all sofa beginners can take a look.

@nickjanssen Here's my index file: https://github.com/knitzie/custom-sofa/blob/master/app/index.html
As mentioned before, I started with a yeoman project and simply added the needed packages in my bower file.
In this case "sofa-core": "0.10.1" and "sofa-checkout-service": "0.6.0". I suppose that after prompt $ bower install all dependencies are installed automatically. The result seems to do what expected, but maybe I'm missing something?

@cburgdorf Good to know that it should work ;) And good to know about the current "in process" packages!
I'm not scared, I'm glad if I can help you. That's why I uploaded my project for other interested persons too - as a form of documentation or getting started.
I'll take a look at the component-seed :)

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

3 participants