JSFiddle - React, Tailwind, and code Playground

by nwinkler

HTML

<script src="http://requirejs.org/docs/release/2.1.5/minified/require.js"></script>

JavaScript

function log(m) {
    $('body').append('<p>' + m);
}

require.config({
    paths: {
        'moment' : 'https://rawgithub.com/timrwood/moment/2.0.0/min/moment.min',
        'moment-langs' : 'https://rawgithub.com/timrwood/moment/2.0.0/min/langs.min'
    }
});

require(['moment', 'moment-langs'], function (moment, momentLangs) {
    moment.lang('en');
    log(moment().format('LLLL'));
    moment.lang('fr');
    log(moment().format('LLLL'));
    moment.lang('de');
    log(moment().format('LLLL'));
});