Copyright © RebelMouse 2019

Follow Us:

JavaScript Libraries

Folder to put in a full JS file is static/js/roar/. If it doesn't exist yet, please create it.

Added JS files which are require ready you can access it with require directly like this

<script type="text/javascript">require(["/static/js/roar/ROAR_NAME/my_library.js"], function(myLib) {    // you can use 'myLib' variable inside here});</script>

If added JS file is not require ready, then you can load it with script src:

<script type="text/javascript" src="/static/js/roar/ROAR_NAME/my_library.js"></script>

Loading 3rd party JavaScript libraries

3rd party libraries normally have some instructions how and where to add them to the page. Some services want to be placed in the <head> with <link> tag, some of them want to be first thing in <body> tag or the last thing of <body> tag. In engine/base.html you can see base structure of the page with these basic tags. But be careful there, this file is used for dashboard as well. If you don't want to touch dashboard and still want to add something into <head> for other public pages, you can do it in engine/community/roar/base.html file. It has few

{% block something %}

parts of code and they overwrite the blocks which are defined in engine/base.html. Frontpage normally has its own base which is located engine/community/roar/base_frontpage.html.

Some other libraries don't care where they are. All you need to do is to place

<script type="text/javascript" src="url_to_3rd_party_library"></script>

somewhere in the code. Most of libraries work like this.

What libraries are already baked into RebelMouse?

  • ace
  • backbone
  • connector
  • hammer
  • highcharts
  • hogan
  • html5shiv
  • jquery
  • moment
  • polyfill
  • require
  • sprintf
  • underscore
  • videojs
  • wix
  • yepnope
  • zeroclipboard

You can use them (and we suggest you to) directly with require:

<script type="text/javascript">require(["jquery", "underscore", "moment"], function($, _, moment){    // code here});</script>

RebelMouse CEO: Reimagining Diversity “Starts in the Office”

Why women, minorities, and the LGBTQ+ community will restructure workplace norms

Entering a new decade means a new opportunity to change how we approach diversity. In a joint interview alongside Leanne Pittsford of Lesbians Who Tech, RebelMouse founder and CEO Andrea Breanna said that the only way to fight patriarchal dominance is to encourage and nurture more women, minorities, and members of the LGBTQ+ community in the workplace, particularly in tech.

Over half of RebelMouse's employees are women or identify as LGBTQ. Read our full diversity and inclusion report here.

Check out the full video below.

Related Articles

Publishers No Longer Have to Submit Their Site to Google News

Google's Publisher Center creates new opportunities for audience growth

Just before the start of the next decade, Google announced an important change to its Google News offering with the launch of Google Publisher Center. The new interface merges Google News Producer and Google News Publisher into one to streamline the partnership process for publishers.

Overall, the change should make it easier for publishers to manage their Google News settings, including updating themes, directing URLs to section pages, and configuring user permissions. Read the full list of features here.

Keep reading...

How to Find Work-Life Balance as a Remote Employee

Tips from our CEO on making the most of an office-free lifestyle

Working from home is becoming increasingly popular, with an estimated 66% of companies now allowing remote work and 16% operating completely office-free. RebelMouse is one of those fully remote companies, and over the years we've mastered how to stay close to each other despite being spread across more than a dozen countries. We believe working remotely is good for both our personal lives and our productivity. Read more about this here.

Still, working free from the shackles of an office environment doesn't mean every day is a dance party in your pajamas from 9 to 5. Working from home comes with its own set of challenges just like any other job.

Keep reading...
Subscribe to Our Newsletter