Q: RequireJS: loading a dictionary or definitions script I just started expermenting with RequireJS and would like to know if the way I'm loading this dictionary/definitions script (called def/polygons.js) with is the most convenient/eficient or not. 
It works, I can instantiate a 'Drawer' and have access to 'polygons' but that 'polygons' variable I THINK is global and I don't feel this may be the best practice... any help will be appreciated :)
File where I require 'def/polygons.js'
/*
 *      Drawer Class Definition
 *
 *
 **/
define([
    'modules/canvas', 
    'def/polygons'
    ], function(Canvas, polygons) {

    'use strict'

    function Drawer(canvasSettings) {

        if (!this instanceof Drawer) {
            throw new TypeError("Drawer constructor cannot be called as a function.");
        }

        this.canvas = new Canvas(canvasSettings);
        this.polygons = polygons;
    }


    Drawer.prototype = {

        /* Repoint base constructor back to the original constructor function */
        constructor: Drawer,

        do: function() {
            console.log("This is just a test");
            console.log(this.polygons);
        }
    };


    return Drawer;
});

And this is the script where I define the polygons dictionary:
/*
 *      Polygon Definitions
 *
 *
 **/
define(function() {

    return {        
        name: 'square',
        position: {
            x: 0,
            y: 0
        },
        points: [{
            x: 0,
            y: 0
        },{
            x: 0,
            y: 0
        },{
            x: 0,
            y: 0
        },{
            x: 0,
            y: 0            
        }]
    }

});


A: 
I THINK is global and I don't feel this may be the best practice

The beauty and power of Require.js is that it helps you to avoid polluting the global scope. With that being said, your polygons class is definitely not being put on the global scope.
Because you've defined it like so:
define(function() {

    return {        
        name: 'square',
        position: {
            x: 0,
            y: 0
        },
        points: [{
            x: 0,
            y: 0
        },{
            x: 0,
            y: 0
        },{
            x: 0,
            y: 0
        },{
            x: 0,
            y: 0            
        }]
    }

});

This module is simply returning your polygon object - nothing is being pushed onto the global scope.
And when you call to access your script here:
define([
    'modules/canvas', 
    'def/polygons'
    ], function(Canvas, polygons) {

    ...

Your polygon object is only being instantiated within the particular scope of this module. 
So with all that being said, your polygon object is not being pushed onto the global scope so don't worry, it is contained within the scope of the particular module(s) that you call for it in.
