Skip to content

Instantly share code, notes, and snippets.

@MiguelCastillo
Created March 30, 2014 13:51
Show Gist options
  • Save MiguelCastillo/9873073 to your computer and use it in GitHub Desktop.
Save MiguelCastillo/9873073 to your computer and use it in GitHub Desktop.
Loading Tern module
define(["require", "exports", "module"], function (require, exports, module) {
"use strict";
/*
* requirejs support in tern
*/
var ternRequire = window.require.config({
"baseUrl": require.toUrl("./tern/"),
"paths": {
"acorn": "node_modules/acorn"
},
waitSeconds: 5
});
// Setup the dependencies for acorn...
ternRequire(["tern"], function(tern) {
console.log(tern);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment