# localjs **Repository Path**: mirrors_pentaho/localjs ## Basic Information - **Project Name**: localjs - **Description**: RequireJS plugin to for loading "local" modules - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2025-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # local.js LocalJS is a [RequireJS](http://requirejs.org) plugin that provides a mechanism to define "local" modules that are defined on the client only and will never require a remote request. These can be used to integrate other framework's asynchronous loading mechanisms with RequireJS. Example usage: We want to depend on a GWT module that will be loaded. This module's name is "gwtModule". ```JavaScript require(['local!gwtModule'], function (gwtModule) { // Do something }); // Our GWT Module will call this function when it has been initialized and can be used var gwtLoaded = function() { // Define a module representing our gwt module. The GWT Module creates a JSNI object to // work with in global space called "jsniGwtModule". require(['local'], function(local) { local.define('gwtModule', function() { return jsniGwtModule; }); }); }; ```