Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #29

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Development #29

wants to merge 12 commits into from

Conversation

Ashp1st
Copy link

@Ashp1st Ashp1st commented Oct 7, 2021

/*

  • Here we define the frequently accessed core classes of boilerplatejs. We are creating a object

  • that carry these classes as properties of it. This object is then used as a namespace when

  • accessing the core classes. This is a trick we use to aggregate classes under namespaces

  • since javascript has no formal way of grouping functions in to namespace.
    */
    define(function (require) {

    /*

    • Here you will notice we are not returning a function from this AMD module. We are returning a
    • plain javascript object with its properties holding references to core classes (functions).
    • We use 'require' function from requirejs inside the object to load appropriate core classes
    • from the respective AMD modules.
      /
      return {
      Context : require("./core/context"),
      DomController : require("./core/dom-controller"),
      UrlController : require("./core/url-controller"),
      UiPanel: require("./core/ui-panel")
      };
      /
  • Here we define the frequently accessed core classes of boilerplatejs. We are creating a object

  • that carry these classes as properties of it. This object is then used as a namespace when

  • accessing the core classes. This is a trick we use to aggregate classes under namespaces

  • since javascript has no formal way of grouping functions in to namespace.
    */
    define(function (require) {

    /*

    • Here you will notice we are not returning a function from this AMD module. We are returning a
    • plain javascript object with its properties holding references to core classes (functions).
    • We use 'require' function from requirejs inside the object to load appropriate core classes
    • from the respective AMD modules.
      */

    /**
    @type Script
    @namespace Boiler
    **/
    return {
    Context : require("./core/context"),
    DomController : require("./core/dom-controller"),
    UrlController : require("./core/url-controller"),
    UiPanel: require("./core/ui-panel")
    };
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants