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

Universal Module Definition patterns for JavaScript modules that work eve... #105

Closed
wants to merge 1 commit into from

Conversation

lagden
Copy link

@lagden lagden commented Apr 16, 2014

UMD ok!

Usage:

requirejs.config({
    baseUrl: 'js/lib',
    paths: {
        'opentip': 'opentip/opentip',
        'opentip-adapter': 'opentip'
    }
});

define(function(require) {

    'use strict';

    // Tooltip
    var Opentip = require('opentip');
    var Adapter = require('opentip-adapter/opentip-adapter-native');

    // Tooltip setup
    Opentip.styles.example = {
        'showOn': 'click',
        'tipJoint': 'top',
        'target': true,
        'fixed': true,
        'hideTrigger': 'closeButton'
    };

    function Tooltip(el, txt) {
        new Opentip(el, txt, {
            style: 'example'
        });
    }

    return Tooltip;
});

@lagden
Copy link
Author

lagden commented Apr 16, 2014

I will change the text editor setup to prevent diff noises

@lagden lagden closed this Apr 16, 2014
@lagden lagden deleted the umdjs branch April 16, 2014 20:17
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.

1 participant