3th party libraries - llorsat/wonkajs GitHub Wiki
Maybe you are asking yourself ¿How can i add libraries or plugins into my wonka project?.
Add plugins:
- Download the package.
- Put the javascript files on the folder libraries.
- Put the css files into a folder with the plugin name, inside the folder stylesheets.
- Put the image files into a folder with the plugin name, inside the folder images.
- Put the font files into a folder with the plugin name, inside the folder fonts.
- Rename your files .css to .less.
- If the files call any image, be sure to replace the relative routes for the variable @{images-route} that points to images folder.
- If the files call any font, be sure to replace the relative routes for the variable @{fonts-route} that points to fonts folder.
- Open *stylesheets/ui.less and import the files .less.
- Open package.json and add the file names of your .js to the section environment.libraries.
- Ready, it's over.
Add a library is easiest:
- Paste the files .js on the folder libraries
- Open the file package.json and add the file names of your .js into section environment.libraries.
- There you go, it's over.
If you want to add any library from any CDN:
- Open index.hbs.
- Before close tag body, add the code to call the library, For example
<script src="http://maps.googleapis.com/maps/api/js?sensor=true" type="text/javascript"></script>
- Save and it's over.