ryanlindsey / middleman-cordova

A Middleman template for Apache Cordova 3.3.x
MIT License
6 stars 1 forks source link

I can't use JQuery Mobile #1

Open edudepetris opened 10 years ago

edudepetris commented 10 years ago

I added jQuery Mobile to my project with Bower and run it Bower install I see the jQuery-mobile into the bower_components folder. Then I have use middleman build and it has generated the build folders. After that I run middleman server and when I try to see the app I get the following error in console :

Uncaught ReferenceError: define is not defined in vendor.js

define([
    "require",
    "./widgets/loader",
    "./events/navigate",
    "./navigation/path",
    "./navigation/history",
    "./navigation/navigator",
    "./navigation/method",
    "./transitions/handlers",
    "./transitions/visuals",
    "./jquery.mobile.animationComplete.js",
    ...

I don't know how to fix this. Can you help me please? Any advice is appreciated for me, Thanks.

ryanlindsey commented 10 years ago

@edudepetris I would recommend you follow the Middleman workflow and load jQuery Mobile via Sprockets by adding it to the vendor manifest. I'm assuming you are using Require JS and that is where the missing define method is coming from. I've never implemented jQuery Mobile with Require so I'm not exactly sure what the pro's and con's of that are.

ryanlindsey commented 10 years ago

@edudepetris Also, I apologize for the late reply, not sure how I missed this.