Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bacbb08

Browse files
committedOct 7, 2014
Use AMD paths mappings
Fixes #73
1 parent 80e3b79 commit bacbb08

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed
 

‎.bowerrc

-3
This file was deleted.

‎Intl.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
define([ "./impl/Record", "./impl/calendars", "./impl/common", "./locales!",
2-
"requirejs-text/text!./cldr/supplemental/currencyData.json",
3-
"requirejs-text/text!./cldr/supplemental/timeData.json",
4-
"requirejs-text/text!./cldr/supplemental/numberingSystems.json" ],
2+
"text!cldr/supplemental/currencyData.json",
3+
"text!cldr/supplemental/timeData.json",
4+
"text!cldr/supplemental/numberingSystems.json" ],
55
function (Record, calendars, common, preloads,
66
currencyDataJson, timeDataJson, numberingSystemsJson) {
77
/**

‎impl/calendarFunctions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define([ "./Record", "requirejs-text/text!../cldr/supplemental/calendarData.json"],
1+
define([ "./Record", "text!cldr/supplemental/calendarData.json"],
22
function (Record, calendarDataJson) {
33
/**
44
* Utility functions that are common across multiple
@@ -73,4 +73,4 @@ define([ "./Record", "requirejs-text/text!../cldr/supplemental/calendarData.json
7373
}
7474
};
7575
return calendarFunctions;
76-
});
76+
});

‎impl/calendars.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
define([ "./Record",
2-
"requirejs-text/text!../cldr/config/calendarDependencies.json",
2+
"text!cldr/config/calendarDependencies.json",
33
"../calendars/gregorianCalendar"],
44
/**
55
* Functions and data related to implementation of calendars.

‎impl/common.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* Commonly used routines throughout ECMA-402 package. Also referred to in the standard as "Abstract Operations"
33
*/
44
define(["./List", "./Record",
5-
"requirejs-text/text!../cldr/config/availableLocales.json",
6-
"requirejs-text/text!../cldr/supplemental/aliases.json",
7-
"requirejs-text/text!../cldr/supplemental/localeAliases.json",
8-
"requirejs-text/text!../cldr/supplemental/parentLocales.json",
9-
"requirejs-text/text!../cldr/supplemental/likelySubtags.json",
10-
"requirejs-text/text!../cldr/supplemental/calendarPreferenceData.json",
5+
"text!cldr/config/availableLocales.json",
6+
"text!cldr/supplemental/aliases.json",
7+
"text!cldr/supplemental/localeAliases.json",
8+
"text!cldr/supplemental/parentLocales.json",
9+
"text!cldr/supplemental/likelySubtags.json",
10+
"text!cldr/supplemental/calendarPreferenceData.json",
1111
],
1212
function (List, Record, availableLocalesJson, aliasesJson, localeAliasesJson,
1313
parentLocalesJson, likelySubtagsJson, calendarPreferenceDataJson) {
@@ -724,4 +724,4 @@ define(["./List", "./Record",
724724

725725
common.availableLocalesList = common.CanonicalizeLocaleList(JSON.parse(availableLocalesJson).availableLocales);
726726
return common;
727-
});
727+
});

‎impl/load.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ define([
88
"./common",
99
"require",
1010
"module",
11-
"requirejs-text/text" // just so builder knows we will be using that module
11+
"text" // just so builder knows we will be using that module
1212
], function (calendars, common, require, module) {
1313
return {
1414
id: module.id,
@@ -38,7 +38,7 @@ define([
3838
dependencies = jsonElements = [config._layerMid + "_" + locale];
3939
} else {
4040
dependencies = jsonElements.map(function (element) {
41-
return "requirejs-text/text!../cldr/" + locale + "/" + element + ".json";
41+
return "text!cldr/" + locale + "/" + element + ".json";
4242
});
4343
}
4444

‎tests/intern.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,19 @@ define({
4444
// loader
4545
useLoader: {
4646
"host-node": "requirejs",
47-
"host-browser": "../../../requirejs/require.js"
47+
"host-browser": "../../bower_components/requirejs/require.js"
4848
},
4949

5050
// Configuration options for the module loader; any AMD configuration options supported by the specified AMD loader
5151
// can be used here
5252
loader: {
53-
baseUrl: "..",
5453
config : {
5554
"ecma402/locales" : /^(ar|de(-CH)?|el|en(-(GB|NZ))?|es|fr|he|hi|id|ja|pt.*|sl|sr(-Latn)?|th|zh.*)$/
55+
},
56+
paths: {
57+
"ecma402": ".",
58+
"requirejs-dplugins": "bower_components/requirejs-dplugins",
59+
"text": "bower_components/requirejs-text/text"
5660
}
5761
},
5862

0 commit comments

Comments
 (0)
Please sign in to comment.