Skip to content
Browse files

Removing require.def, it has been a while since it has been broadcast…

…ed as a public API.
  • Loading branch information...
1 parent 70886a8 commit 2720387ffa9a0b0f4312c03dc14cf5baa06b5785 @jrburke jrburke committed Aug 24, 2011
Showing with 66 additions and 63 deletions.
  1. +1 −1 require.js
  2. +4 −1 tasks.txt
  3. +1 −1 tests/anon/c.js
  4. +1 −1 tests/anon/green.js
  5. +1 −1 tests/anon/red.js
  6. +1 −1 tests/anon/yellow.js
  7. +1 −1 tests/exports/assign.js
  8. +1 −1 tests/exports/assign2.js
  9. +1 −1 tests/exports/funcSet.js
  10. +1 −1 tests/exports/vanilla.js
  11. +1 −1 tests/funcOne.js
  12. +2 −2 tests/funcThree.js
  13. +1 −1 tests/i18n/nls/colors.js
  14. +1 −1 tests/i18n/nls/fr/colors.js
  15. +1 −1 tests/i18n/testModule.js
  16. +1 −1 tests/layers/epsilon.js
  17. +1 −1 tests/layers/layer1.js
  18. +1 −1 tests/map.js
  19. +1 −1 tests/packages/baz/lib/helper.js
  20. +1 −1 tests/packages/dojox/door.js
  21. +1 −1 tests/packages/dojox/window/pane.js
  22. +1 −1 tests/packages/dojox/window/window.js
  23. +1 −1 tests/packages/pkgs/alpha/main.js
  24. +1 −1 tests/packages/pkgs/beta/0.2/scripts/beta.js
  25. +1 −1 tests/packages/pkgs/dojox/chair/legs.js
  26. +1 −1 tests/packages/pkgs/dojox/table/table.js
  27. +1 −1 tests/packages/replace.js
  28. +1 −1 tests/priority/leaf.js
  29. +2 −2 tests/priority/one.js
  30. +2 −2 tests/priority/priorityOptimized.js
  31. +3 −3 tests/priority/priorityWithDeps/script/req/app.js
  32. +1 −1 tests/priority/priorityWithDeps/script/req/begin.js
  33. +4 −4 tests/priority/priorityWithDeps/script/req/bootstrap.js
  34. +1 −1 tests/priority/priorityWithDeps/script/req/config.js
  35. +1 −1 tests/priority/priorityWithDeps/script/req/utils/utils.js
  36. +5 −5 tests/priority/three.js
  37. +1 −1 tests/priority/tree.js
  38. +2 −2 tests/priority/two.js
  39. +1 −1 tests/relative/foo/bar/two.js
  40. +1 −1 tests/relative/foo/three.js
  41. +1 −1 tests/text/subwidget.js
  42. +1 −1 tests/tres.js
  43. +1 −1 tests/uniques/three.js
  44. +1 −1 tests/uniques/two.js
  45. +1 −1 tests/uno.js
  46. +1 −1 tests/urlfetch/three.js
  47. +2 −2 tests/urlfetch/two.js
  48. +1 −1 tests/version1/alpha.js
  49. +1 −1 tests/version2/omega.js
View
2 require.js
@@ -1579,7 +1579,7 @@ var requirejs, require, define;
* return a value to define the module corresponding to the first argument's
* name.
*/
- define = req.def = function (name, deps, callback) {
+ define = function (name, deps, callback) {
var node, context;
//Allow for anonymous functions
View
5 tasks.txt
@@ -1,11 +1,14 @@
Release Notes
-------------------
- removed module.setExports support.
+- removed require.def support
Next release
--------------
-- remove require.def()
+- domready
+- code pass
+- need to document writeFile
coffeescript:
- mix of types a problem? https://github.com/jrburke/require-cs/issues/5
View
2 tests/anon/c.js
@@ -1,4 +1,4 @@
-require.def(function (require) {
+define(function (require) {
var a = require('a');
return {
name: 'c',
View
2 tests/anon/green.js
@@ -1,3 +1,3 @@
-require.def({
+define({
name: "green"
});
View
2 tests/anon/red.js
@@ -1,4 +1,4 @@
-require.def("red", function () {
+define("red", function () {
return {
name: "red"
};
View
2 tests/anon/yellow.js
@@ -1,3 +1,3 @@
-require.def("yellow", {
+define("yellow", {
name: "yellow"
});
View
2 tests/exports/assign.js
@@ -1,4 +1,4 @@
-require.def("assign",
+define("assign",
["require", "exports", "module"],
function (require, exports, module) {
module.exports = "assign";
View
2 tests/exports/assign2.js
@@ -1,4 +1,4 @@
-require.def(["module", "exports", "require"],
+define(["module", "exports", "require"],
function (module, exports, require) {
module.exports = "assign2";
});
View
2 tests/exports/funcSet.js
@@ -1,4 +1,4 @@
-require.def("funcSet",
+define("funcSet",
["require", "exports", "module"],
function (require, exports, module) {
module.exports = "funcSet";
View
2 tests/exports/vanilla.js
@@ -1,4 +1,4 @@
-require.def("vanilla",
+define("vanilla",
["require", "exports", "module"],
function (require, exports, module) {
exports.name = "vanilla";
View
2 tests/funcOne.js
@@ -1,4 +1,4 @@
-require.def("funcOne",
+define("funcOne",
["require", "funcTwo"],
function (require) {
var one = function (name) {
View
4 tests/funcThree.js
@@ -1,4 +1,4 @@
-require.def("funcThree",
+define("funcThree",
["funcFour"],
function (four) {
var three = function (arg) {
@@ -8,7 +8,7 @@ require.def("funcThree",
three.suffix = function () {
return "THREE_SUFFIX";
};
-
+
return three;
}
);
View
2 tests/i18n/nls/colors.js
@@ -1,4 +1,4 @@
-require.def({
+define({
"root": {
red: "red",
blue: "blue",
View
2 tests/i18n/nls/fr/colors.js
@@ -1,4 +1,4 @@
-require.def({
+define({
red: "rouge",
blue: "bleu"
});
View
2 tests/i18n/testModule.js
@@ -1,5 +1,5 @@
//A sample module to use in the i18n build test.
-require.def(["i18n!nls/colors"], function (colors) {
+define(["i18n!nls/colors"], function (colors) {
var red = colors.red;
});
View
2 tests/layers/epsilon.js
@@ -1,4 +1,4 @@
-require.def("epsilon",
+define("epsilon",
{
name: "epsilon"
}
View
2 tests/layers/layer1.js
@@ -1,6 +1,6 @@
//Example layer file.
-require.def("alpha",
+define("alpha",
["beta", "gamma"],
function (beta, gamma) {
return {
View
2 tests/map.js
@@ -1,4 +1,4 @@
-require.def("map",
+define("map",
function() {
return {
name: "map"
View
2 tests/packages/baz/lib/helper.js
@@ -1,3 +1,3 @@
-require.def({
+define({
name: "baz/helper"
});
View
2 tests/packages/dojox/door.js
@@ -1,3 +1,3 @@
-require.def({
+define({
name: 'dojox/door'
});
View
2 tests/packages/dojox/window/pane.js
@@ -1,3 +1,3 @@
-require.def({
+define({
name: 'dojox/window/pane'
});
View
2 tests/packages/dojox/window/window.js
@@ -1,4 +1,4 @@
-require.def(['./pane'], function (pane) {
+define(['./pane'], function (pane) {
return {
name: 'dojox/window',
paneName: pane.name
View
2 tests/packages/pkgs/alpha/main.js
@@ -1,3 +1,3 @@
-require.def({
+define({
name: 'alpha'
});
View
2 tests/packages/pkgs/beta/0.2/scripts/beta.js
@@ -1,3 +1,3 @@
-require.def(function () {
+define(function () {
return 'beta';
});
View
2 tests/packages/pkgs/dojox/chair/legs.js
@@ -1,3 +1,3 @@
-require.def({
+define({
name: 'dojox/chair/legs'
});
View
2 tests/packages/pkgs/dojox/table/table.js
@@ -1,4 +1,4 @@
-require.def(['dojox/chair'], function (chair) {
+define(['dojox/chair'], function (chair) {
return {
name: 'dojox/table',
chairName: chair.name
View
2 tests/packages/replace.js
@@ -1,4 +1,4 @@
//Tests overriding a package path with a more specific mapping.
-require.def({
+define({
name: 'fake/alpha/replace'
});
View
2 tests/priority/leaf.js
@@ -1,5 +1,5 @@
var globalLeafName = "leaf";
-require.def("leaf", {
+define("leaf", {
name: globalLeafName
});
View
4 tests/priority/one.js
@@ -1,6 +1,6 @@
//Example layer file.
-require.def("alpha",
+define("alpha",
["beta", "gamma"],
function (beta, gamma) {
return {
@@ -10,7 +10,7 @@ require.def("alpha",
}
);
-require.def("beta",
+define("beta",
["gamma"],
function (gamma) {
return {
View
4 tests/priority/priorityOptimized.js
@@ -16,15 +16,15 @@ doh.run();
//START simulated optimization of the "one" dependency, it should not be
//be requested as a separate script.
-require.def("alphaPrime",
+define("alphaPrime",
function () {
return {
name: "alphaPrime"
};
}
);
-require.def("betaPrime",
+define("betaPrime",
["alphaPrime"],
function (alphaPrime) {
return {
View
6 tests/priority/priorityWithDeps/script/req/app.js
@@ -1,10 +1,10 @@
-require.def('Carousel', function () {
+define('Carousel', function () {
return function Carousel(service) {
this.service = service;
this.someType = 'Carousel';
};
});
-require.def('app', ['Carousel'], function () {
-
+define('app', ['Carousel'], function () {
+
});
View
2 tests/priority/priorityWithDeps/script/req/begin.js
@@ -1,4 +1,4 @@
-require.def('req/begin', function() {
+define('req/begin', function() {
window.ip = {
begin: 'begin',
controllers: {},
View
8 tests/priority/priorityWithDeps/script/req/bootstrap.js
@@ -1,4 +1,4 @@
-require.def('req/bootstrap', [
+define('req/bootstrap', [
'req/begin',
'req/config',
'req/utils/utils'
@@ -10,17 +10,17 @@ require.def('req/bootstrap', [
/*
//begin module defines a global
var begin = {};
-require.def('begin', function () {
+define('begin', function () {
begin.name = 'begin';
});
//appConfig defines a global.
var appConfig = {};
-require.def('appConfig', ['begin'], function () {
+define('appConfig', ['begin'], function () {
appConfig.state = 'alpha';
});
-require.def('bootstrap', ['begin', 'appConfig'], function () {
+define('bootstrap', ['begin', 'appConfig'], function () {
appConfig.bootstrap = 'bootstrap';
});
*/
View
2 tests/priority/priorityWithDeps/script/req/config.js
@@ -1,4 +1,4 @@
-require.def('req/config', [
+define('req/config', [
'req/begin'
], function() {
var config = {
View
2 tests/priority/priorityWithDeps/script/req/utils/utils.js
@@ -1,4 +1,4 @@
-require.def('req/utils/utils', [
+define('req/utils/utils', [
'req/begin',
'req/config'
], function() {
View
10 tests/priority/three.js
@@ -1,6 +1,6 @@
//Example layer file.
-require.def("alpha",
+define("alpha",
["beta", "gamma"],
function (beta, gamma) {
return {
@@ -10,7 +10,7 @@ require.def("alpha",
}
);
-require.def("beta",
+define("beta",
["gamma"],
function (gamma) {
return {
@@ -23,7 +23,7 @@ require.def("beta",
//Example layer file.
-require.def("gamma",
+define("gamma",
["theta", "epsilon"],
function (theta, epsilon) {
return {
@@ -34,15 +34,15 @@ require.def("gamma",
}
);
-require.def("theta",
+define("theta",
function () {
return {
name: "theta"
};
}
);
-require.def("epsilon",
+define("epsilon",
{
name: "epsilon"
}
View
2 tests/priority/tree.js
@@ -1,4 +1,4 @@
-require.def("bark", function () {
+define("bark", function () {
return {
name: "bark"
};
View
4 tests/priority/two.js
@@ -1,6 +1,6 @@
//Example layer file.
-require.def("gamma",
+define("gamma",
["theta", "epsilon"],
function (theta, epsilon) {
return {
@@ -11,7 +11,7 @@ require.def("gamma",
}
);
-require.def("theta",
+define("theta",
function () {
return {
name: "theta"
View
2 tests/relative/foo/bar/two.js
@@ -1,3 +1,3 @@
-require.def("foo/bar/two", {
+define("foo/bar/two", {
name: "two"
});
View
2 tests/relative/foo/three.js
@@ -1,3 +1,3 @@
-require.def("foo/three", {
+define("foo/three", {
name: "three"
});
View
2 tests/text/subwidget.js
@@ -1,4 +1,4 @@
-require.def("subwidget",
+define("subwidget",
["text!subwidget.html!strip", "text!subwidget2.html"],
function(template, template2) {
return {
View
2 tests/tres.js
@@ -1,4 +1,4 @@
-require.def("tres",
+define("tres",
function() {
return {
name: "tres"
View
2 tests/uniques/three.js
@@ -1,3 +1,3 @@
-require.def("three", {
+define("three", {
name: "three"
});
View
2 tests/uniques/two.js
@@ -1,4 +1,4 @@
-require.def("two", ["one", "three", "one"], function (one, three, one2) {
+define("two", ["one", "three", "one"], function (one, three, one2) {
return {
name: "two",
oneName: one.name,
View
2 tests/uno.js
@@ -1,4 +1,4 @@
-require.def("uno",
+define("uno",
["dos", "tres"],
function(dos, tres) {
return {
View
2 tests/urlfetch/three.js
@@ -1,4 +1,4 @@
-require.def("three", {
+define("three", {
name: "three"
});
View
4 tests/urlfetch/two.js
@@ -1,8 +1,8 @@
-require.def("one", {
+define("one", {
name: "one"
});
-require.def("two", ["one"], function (one) {
+define("two", ["one"], function (one) {
return {
name: "two",
oneName: "one"
View
2 tests/version1/alpha.js
@@ -1,4 +1,4 @@
-require.def("alpha",
+define("alpha",
function() {
return {
version: 1
View
2 tests/version2/omega.js
@@ -1,4 +1,4 @@
-require.def("omega",
+define("omega",
function() {
return {
version: 2

0 comments on commit 2720387

Please sign in to comment.
Something went wrong with that request. Please try again.