Skip to content
This repository was archived by the owner on Sep 14, 2021. It is now read-only.
This repository was archived by the owner on Sep 14, 2021. It is now read-only.

Update pluginifier and plugin boilerplate to enable use as AMD modules. #5

@nevf

Description

@nevf

I've wrapped both the pluginifier and boiler plate code in:

// Wrap in a closure to secure $ for jQuery
// Uses AMD or browser globals to create a jQuery plugin.
// It does not try to register in a CommonJS environment since jQuery is not likely to run in those environments.
// See jqueryPluginCommonJs.js for that version. ref: 27/05/2012
(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['jquery'], factory);
    } else {
        // Browser globals
        factory(jQuery);
    }
}(function( $ ) {
.....
}));

As per Require.js docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions