We are having some trouble with getting the Zurb Foundation Sites JavaScript plugins to initialize correctly when imported via SystemJS.
We have installed jQuery and Foundation via JSPM:
jspm install jquery
jspm install npm:foundation-sites
Then we initialize the application like this:
import jQuery from 'jquery';
import foundation from 'foundation-sites';
jQuery(document).foundation();
When we then try to get Sticky to work for example, the CSS classes are added (via JS). But the script doesn't work, and we get no errors.
When we then bundle the application via JSPM the script works like it should. So it feels like we have got some problem with dependencies not loading. We have tried figuring out how to shim dependencies in SystemJS, without any luck.
Is there maybe someone that have gotten this to work?
I tried a lot of version and the last that now works looks like this
import "jquery";
import "foundation-sites";
Calling foundation than works like in the question with jQuery(document).foundation();
Related
I have an Ember app built using ember-cli and I'm writing my tests using the ember-qunit testing adapter and running them in the browser using testem as instructed in the ember-cli documentation. Although debugging in Google Chrome works fine when I'm interesting with my app, I am unable to use many debugging features such as breakpoints when running my tests.
I often run into a problem that my tests fail despite my actual app seeming to work properly, and to investigate the problem I would like to step through code while my tests are running.
But when I step into code that appears in vendor.js I just just see the following contents in my vendor.js:
// Please wait a bit.
// Compiled script is not shown while source map is being loaded!
These two lines are lines 6 & 7 of the file. The lines before this are blank, and these two lines are the last lines in the file. The debugger has the first line of the file highlighted as if that's the current location in the source, but it cannot show the source for some reason.
I can proceed to step through the code, but I can't see anything.
However, if I find vendor.js in the list of sources in the developer tools sources file list then it opens as a separate source tab and I can see all my code. At this point I have two tabs labeled vendor.js, one with all my vendor assets and one with just those line quoted above.
I am guessing that there is something different between how my tests are served and how my app is served in the development environment that is confusing Chrome.
I am using the following versions of things:
ember 1.9.1
ember-data 1.0.0-beta.14.1
ember-cli 0.1.9
qunit 1.17.1
ember-qunit 0.2.0
testem 0.6.33
Although I've poked around a bunch I don't really have any leads on where the problem is stemming from. Perhaps it's related to how testem is running the tests? Or could it be something that gets included in my tests has a messed up source map?
I appreciate any help or ideas.
I'm on ember-cli 0.2.2.
I ran across this problem as well and found this Chrome issue with processing sourcemaps.
People commenting on the issue suggest using the Chrome Canary build for now:
I'm currently using the Canary build to put breakpoints in and debug my ember code.
Get it here: https://www.google.com/chrome/browser/canary.html
I am working on Ubuntu 14.04 64bit. Default python 2.7.x package. Custom built Kivy (rather, it is not the kivy supplied in the repositories. I used pip to gather dependencies and build Kivy in a Virtualenv)
For some reason, I seem to have no control over a large portion of my runtime Configuration. I have tried using environment variables, kivi.ini in my working directory and home directory. I have tried directly importing the kivy.Config module at various different points in the runtime (before the Kivy App is built, during, after).
It seems that I cannot configure certain Kivi settings (default screen size for instance). My Kivy application is quite functional, but I am having trouble finding where Kivi looks for default configurations, and where the proper place is to override. I have tried many different ways, but it seems there is some master configuration that is taking priority and I am not able to override.
Am I missing something simple? Does this have anything to do with the virtualenv (and how Kivy was built)?
I have tried directly importing the kivy.Config module at various different points in the runtime (before the Kivy App is built, during, after).
If this is to work, it should be before anything else is imported.
Also, kivy is probably looking for the config file in ~/.kivy/config.ini.
We have a requirement to render a local html file in a webview on a mfc window. Currently we have achieved this with IE and now we need to do the same with firefox and then with chrome.
Some of the options suggest using webkit or gecko sdk but we would rather like to use already installed libraries and binaries of these browsers on a windows machine.
It would be of great help if you could point me into some documentation or some sample code to achieve this.
Thanks for your response.
-Aditya
IE provides a COM component but AFAIK none of the other browsers do.
Qt provide QtWebView class, it's a wrapper of WebKit's web view, and it's cross-platform.
Or use MFC/WTL's CHtmlView, but IE so sucks.
I was using COCOS2d android in my project and now i need to replace COCOS2d-android with The latest cocos2d. When i replace this jar it shows some package cannot be resolved errors in the below packages
import org.cocos2d.protocols.CCTouchDelegateProtocol;
import org.cocos2d.sound.SoundEngine;
Is their any latest COCOS2d android jar available with these files or is there any way to integreate these packages.
A question could arise why would i want to do this??
How can i override ccTouchbegan in cocos2d-android( removal of overlaying sprites)
I'm new to django, and I'm working on my first google appengine app. I use Pycharm as my IDE.
In my HTML files, template code has no smart-indent and syntax-highlighting, it looks BAD! Is there any tools or plugins to handle this situation?
You should try pycharm
http://www.jetbrains.com/pycharm/