How to include external libraries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to include external libraries

paul-3
Hi Folks,
I started a small project in Amber one week ago and hey working with Amber is just great.

I read the different posts concerning external libraries but I struggle a bit each time I add an external lib.

I integrated TinyMCE into my application like this, and it works fine:
  1. bower install tinymce --save
  2. added a tinymce.amd.json with: { "paths": {  "tinymce": "tinymce"  } }
  3. added tinymce to deploy.js and devel.js
  4. grunt devel
  5. amber serve
  6. added a TinyMCE Class with a message to init on an Object <tinymce.init(anObject)>
Some files like special plugins still get loaded directly by tinymce from subfolders. So I have to provide those folders in the expected paths. Anyways, it works :-)  

Then I added bootstrap the same way like I described and it breaks helios. Helios opens but stays empty. My dirty solution was adding a copy of bootstrap with another name "bootstrap3" and bootstrap3.amd.json and require this version. I use the lates stable version of amber and helios

Did anyone else encounter this problem with bootstrap and how did you resolve it? 

Now I want to add a fileupload library named "blueimp-file-upload". It has a jquery and bootstrap plugin. How should I proceed and how do I use it inside Amber. 
The last time I tried adding a jquery plugin it wasn't loaded properly or at least I didn't figure out how to export it so that it gets integrated to jquery properly.

Maybe this is obvious for all of you but a good how to for external lib integration would be really great, I think. 
I mean something like a practical scenario for a standalone js lib, and a plugin for jquery.

Kind regards and many thanks in advance,

Paul

 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.