How to integrate further JS dependencies in ZURB FOUNDATION project? - zurb-foundation

I'm using the ZURB Template (ZURB foundation 6.4).
I want to use dropdown menus and the like, which require the integration of further JS dependencies.
Here is the official Documentation:
https://foundation.zurb.com/sites/docs/dropdown-menu.html
The following is important for me:
The following files must be included in your JavaScript to use this plugin:
foundation.core.js
foundation.dropdownMenu.js
With utility library foundation.util.keyboard.js
With utility library foundation.util.box.js
With utility library foundation.util.nest.js
With utility library foundation.util.touch.js
Now I dont really know where I have to do these inclusions, and how.
I already integrated a third party plugin into my project, chart.js, but this is obviously a "native" plugin by foundation and I dont know how to do this.
In which file do I have to make these additions, and with what syntax?
In the app.js, they already use a mixture of ES6 and CommonJS for getting Jquery to run, because the hoisting behavior of ES6 would cause problems.
However, this doesn't really make things easier for me and it makes me wonder even more what I have to do to set this up ^^

See https://github.com/foundation/foundation-zurb-template/blob/master/src/assets/js/app.js and the explicit-pieces file for an example.

Related

Ember.js, FontAwesome & Sass

I have an Ember.js project where I use Fontawesome5 and Sass. Creating an icon is easy with <FaIcon #icon="..."/>. But now I want to use an icon from Fontawesome with Sass (more specifically with list-style). I guess I could use the way it is described in the fontawesome-sass-documentation, but this feels wrong in more than one way.
I tried to create a route get-icon, that I could use with list-style: url(...), but as far as I see that can't work with ember.js.
So is there a preferred way to get a fontawesome icon for list-style in an ember project?
I assume that you are using the official font awesome library for Ember.js: #fortawesome/ember-fontawesome It provides the <FaIcon> component you mentioned.
#fortawesome/ember-fontawesome does not provide integration to use the SASS styles. There is an open feature request as an issue on its GitHub repository but it hasn't received any response yet.
I assume that you are using ember-cli-sass to integrate SASS in your build process. It's the de facto standard in Ember community as fa as I'm aware.
ember-cli-sass has an includePaths option, which allows to import SASS files from other folders than app/styles. You can use this option to inlcude the required SASS files in your build and import the required SASS files in your app/styles/app.scss.
ember-cli-sass documentation includes an example how to do so for foundation CSS framework. You can use that one as a starting point.

Plugin to help copy/paste XML in android studio according to some pattern?

I use android studio for creating android apps. While designing the UI I mostly find myself copy pasting my custom made components to test different things out and to see how would they look when I actually populate the view with my component using some adapter. But when I duplicate my components I manually have to update there id's and other attributes in XML according to needs. But those changes mostly have some sort of pattern which I can always define using a regular expression.
So, in short is there any tool for android studio that can help me copy/paste XML by defining some pattern via regex or something else ?
Or should I see this as an opportunity to create my own plugin and start coding right away.
Android Studio (Version 3.3+) supports Live Templates, that you can make as per your use. These can be for .java as well as .xml file formats. See this official Android Developer Youtube channel.
More resources regarding templates in Android Studio:
How to make your own file templates in Android Studio - This is
a multi-part post.
Supercharging your app development speed with
custom file templates
A collection of some Android Studio Live
Templates - This is a Github repo.
You can also try to make repeatedly used classes, activities etc into a library package and reuse them across your projects. Add some tests to them to make sure they work as intended and with some CI/CD scripting and gradle plugins (like gradle-use-latest-versions-plugin) you can have them automatically upgrade to use latest dependency versions etc. Then all you'd need to do is pull them from a repository or include them as a library in your projects to reduce code redundancy.
Hope this helps.

Using Foundation 5 with Hammer for Mac

I'm starting using Foundation 5 for a current project and using the command line + Compass to watch for changes to my stylesheet and output CSS, but it takes almost two entire seconds for it to save out my CSS.
I've also been using Hammer (http://hammerformac.com/) a lot this year for optimising my code and was wondering if anyone had used Foundation with Hammer, and was interested on how well they work together?
As I understand right, the main goal is to accelerate compiling your sass files.
Maybe libsass is what you need. It is C library for compiling sass files
More information you can find here:
http://benfrain.com/lightning-fast-sass-compiling-with-libsass-node-sass-and-grunt-sass/
Actually, the Hammer documentation has been updated. Check out Tips & Tricks where you'll see this:
ZURB Foundation and Hammer
If you're working with ZURB's Foundation framework, you'll need to grab the Standalone Foundation files from GitHub.
Simply include the Foundation files in your project, include them in your SCSS files with #include "foundation/foundation" and you're good to go!

How to integrate Foundation 5 in django

I'd like to starting use Foundation 5 in a django project.
My doubts are about how to setup folders of Foundation project.
Foundation now uses bower for js dipendencies.
I think it's not correct make a foundation 5 set up into the static folder of django.
Has anyone done a setup of foundation in a django project?
To compile scss files I'll use django-compressor.
My solution is use django-bower... that's all!
Check here. It should have all the instructions.
https://pypi.python.org/pypi/django-zurb-foundation
I've been playing with foundation on my django project using the django development server. All I did was download the Foundation 5 static files (JS,CSS) and add them to my django static files. Then I added in the necessary scripts to my base template as shown here: http://foundation.zurb.com/docs/css.html. I haven't put it into production yet but I don't see any reason why that wouldn't work or why using static files isn't correct (as you thought in your question).
There are benefits to compiling the CSS yourself with SASS if you're really hardcore and I imagine that using template tags with django-zurb-foundation is a little cleaner or maybe easier to implement if you have tons of templates that you would need to modify but if you're like me and you just want to try Foundation out on a small project then downloading the extra applications (django-bower, django-zurb-foundation) isn't necessary.

Delivering an xcode framework with other dependencies

We are trying to release an iOS version of our library and are planning on delivering it as a compiled static framework. Using Xcode the framework and test app we have are compiling successfully and running fine.
The question is: What is the best way to deliver it?
Our library is dependent on some other opensource frameworks, and we also want to ship a test app with the framework to show how to actually use the library properly.
Should we use an umbrella framework? Apple suggests "Don't Create Umbrella Frameworks" (http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/CreationGuidelines.html)
Should we just deliver a zip that has our framework as well as all the frameworks we're dependent on and just tell the clients that they have to include those frameworks in their projects?
What's the best way to include the test app?
Thanks in advance!
Take a look at CocoaPods as a means to manage the dependencies (especially if those dependencies are open-source).
https://github.com/CocoaPods/CocoaPods
I would include the required frameworks with your compiled framework with the exception of frameworks that come standard with the iOS SDK. Most every framework is going to rely on Foundation and UIKit, those are frameworks that will most likely already be included. Anything else they won't have access to, include with your framework you send over.