mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Move definitions and test in separate folders
This enables each definition to have a readme if necessary. Also a .json metadata file to help with package managers. And last, to have different versions of the definitions.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/// <reference path="../Definitions/require-2.1.d.ts" />
|
||||
|
||||
// this test does not actually reference amd module 'main.ts', create one yourself.
|
||||
|
||||
require.config({
|
||||
baseUrl: '../Definitions',
|
||||
|
||||
// Requires versions afaik
|
||||
paths: {
|
||||
'jquery': '../Definitions/jquery',
|
||||
'underscore': '../Definitions/underscore',
|
||||
'backbone': '../Definitions/backbone'
|
||||
},
|
||||
|
||||
shim: {
|
||||
jquery: {
|
||||
exports: '$'
|
||||
},
|
||||
|
||||
underscore: {
|
||||
exports: '_'
|
||||
},
|
||||
|
||||
backbone: {
|
||||
deps: ['underscore', 'jquery'],
|
||||
exports: 'Backbone'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// load AMD module main.ts (compiled to main.js)
|
||||
// and include shims $, _, Backbone
|
||||
|
||||
require(['main'], (main, $, _, Backbone) => {
|
||||
|
||||
var app = main.AppMain();
|
||||
app.run();
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user