[API Refactor] Move out non-global require config

This commit is contained in:
Victor Woeltjen 2016-01-13 12:40:03 -08:00
parent 45142e03dc
commit 69c5b110bf
4 changed files with 21 additions and 20 deletions

10
main.js
View File

@ -25,19 +25,11 @@ requirejs.config({
"paths": {
"legacyRegistry": "src/legacyRegistry",
"angular": "platform/framework/lib/angular.min",
"angular-route": "platform/framework/lib/angular-route.min",
"moment": 'platform/telemetry/lib/moment.min',
"moment-duration-format": 'platform/features/clock/lib/moment-duration-format'
"moment": 'platform/telemetry/lib/moment.min'
},
"shim": {
"angular": {
"exports": "angular"
},
"angular-route": {
"deps": [ "angular" ]
},
"moment-duration-format": {
"deps": [ 'moment' ]
}
}
});

View File

@ -19,10 +19,18 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
/*global define,requirejs*/
requirejs.config({
shim: {
'platform/features/clock/lib/moment-duration-format': {
deps: [ 'moment' ]
}
}
});
define(
['moment', 'moment-duration-format'],
['moment', '../../lib/moment-duration-format'],
function (moment) {
"use strict";

View File

@ -21,6 +21,14 @@
*****************************************************************************/
/*global define, window, requirejs*/
requirejs.config({
shim: {
'platform/framework/lib/angular-route.min': {
deps: [ 'angular' ]
}
}
});
/**
* Implements the framework layer, which handles the loading of bundles
* and the wiring-together of the extensions they expose.
@ -32,7 +40,7 @@ define(
'../lib/es6-promise-2.0.0.min',
'./FrameworkLayer',
'angular',
'angular-route'
'../lib/angular-route.min'
],
function (
require,

View File

@ -44,14 +44,7 @@ require.config({
paths: {
'es6-promise': 'platform/framework/lib/es6-promise-2.0.0.min',
'moment': 'platform/telemetry/lib/moment.min',
'moment-duration-format': 'platform/features/clock/lib/moment-duration-format'
},
shim: {
'moment-duration-format': {
deps: [ 'moment' ]
}
'moment': 'platform/telemetry/lib/moment.min'
},
// dynamically load all test files