This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks.txt
223 lines (157 loc) · 8.12 KB
/
tasks.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
- simple node example does not work
- need to document how to use the packages config with Node.
- Document new closure compiler options from neonstalwart
- email on jsonp removal, toUrl and package names.
- Nested package config: https://github.com/jrburke/requirejs/pull/28
- IE, on errors, hits script onload, but need to make sure it is treated as a failure?
Node issues:
* socket.io/support/socket.io-client/lib/io.js. uses "this" to attach properties to export?!?
* connect/lib/connect/index.js and express/support/connect/lib/connect/index.js do a try/catch for "constants"
xx* connect-redis/lib/redis/index.js, it tried to require('util') or 'sys' try/catch dependening on node version.
* connect/lib/connect/index.js does dynamic/computed require calls
- How to optimize a package? If ask for require('packageName'), what is the name of the module
included? define('packageName', ...) or define('packageName/lib/main') ?
require({
mappings: {
'alpha': 'package:',
'beta': 'package:' hmmm.
}
packages: [
'alpha',
{'beta': 'package:...'}
]
});
//Don't use "mappings" so not confused with Mappings/C?
require({
paths: {
//A regular single script mapping,
//or a traditional dojo-like mapping.
'foo': '../../common/foo',
//alpha has specific mappings, so alpha's value
'alpha': {
//A package found relative to
//baseUrl, with the standard convention
//of lib=lib and main=main
path: 'package:',
paths: {
//A package found relative to
//baseUrl, but lib=. and main=index
theta: 'package:#./index',
}
},
'beta': 'package:path#lib/main'
}
});
define.paths('alpha', {}, function (define) {
define('alpha', [], function () {});
define('theta', [], function (){});
define.paths('theta', {}, function (define) {
});
});
//Fetches alpha/lib/main.js and beta/lib/main.js
require(['alpha', 'beta'], function(alpha, beta){
})
alpha/lib/main.js
-------------------
require({
packages: [
name: 'alpha',
mappings: {
//A single, non-packaged module
'theta': 'theta',
//HMM, HOW TO SPECIFY SIMPLE PACKAGE WITH CONVENTIONS?
'gamma': 'package:',
'epsilon': 'package:./lib/main',
'foo': 'package:http://a.com/some/path/to/foo/./index'
//A beta package, but version 2,
//assumes the lib and main conventions.
{
name: 'beta',
location: 'betaV2'
}
}]
});
//Fetches theta/lib/main.js and betaV2/lib/main.js
define('alpha', ['theta', 'beta'], function (){})
-----------
- toUrl: how to resolve relative to package names?
- https://github.com/jrburke/requirejs/issues#issue/26:
spider: throw with isCheckLoaded: maybe pass for refactor branch?
backbone.js patch to work with requirejs?
https://github.com/jrburke/requirejs/issues/issue/9
- Optimizer cannot include order! plugins in a build at the moment.
Optimizer improvements:
2) Investigate the issue with main.js baseUrl overriding the one in app.build.js
4) See if the pathing can be made simpler (abde's comment).
- Figure out if isCheckLoaded can be avoided. Not likely, but revisit.
- Finish PS3 work, investigate test failures, document level of support.
- get rid of pragma for page load logic exclusion?
- Check out blackberry emulators at:
https://www.blackberry.com/Downloads/entry.do?code=060AD92489947D410D897474079C1477
- Building a lib that has its own lookup paths, so it can be self-contained?
but what if want to share code? Maybe just make it an option, you can do it,
but lose out on shared common.
- refactor considerations:
- Only execute module functions that have a specific dependency set for them?
Does this break some pure-web cases now? Probably not?
- Allow for module reload by tracing dependers. But is module reloading practical?
Need to have a "destroy" method on a module, to unregister event handlers?
Or a function callback that can be called for each module unload, and that can
do custom app unregistering, but should start from leaves and work to the trunk,
in case the unregister call
- For function(require, exports, module) form, do not pass exports if the function
does not ask for it, to allow the function to set the exported value by returning.
- Figure out why priorityOrder test does not work, and if it should be supported.
Loading a plugin while waiting for a priority load may not be worth supporting,
it also means it will be slower. A priority module can include plugins but just
use a plugin to load the priorit module.
- in commonJs.js convert, if take out dependency scanning, things break in the Node adapter.
Need to figure out why. Function.toString() seems to work.
- Move to using module.basePath instead of require.nameToUrl inside methods? basePath
would basically call nameToUrl but use no suffix. Hmm, nice thing about nameToUrl is it
works with any name, not just current module. require.nameToUrl(module.id, ".html")
but should a module reach outside of its directory?
- DOH updates
- get latest code
- fix rendering in IE 9 standards? How to get it to render in IE9 standard mode?
- Allow module names that match Object.prototype method names?
- browser test for loading css?
- Best practices/architecture guide
- Allow r.js to work on Rhino
- consider removing require.isBrowser and require.s.isBrowser, check the tests, and send email to list first.
- include i18n and text plugins in node integration. Make sure text plugin works?
- Look at jquery ui adapter
- jquery as a module
- require.nameToUrl convertDojo.js for dojo.moduleUrl("dojo", "resources/blank.gif")
would be cool to pass require.nameToUrl("dojo/resources/blank.gif") and have that work. Why is .js assumed?
- Deliver distribution of Dojo based on require
- manual fix for requireIf in dojo.gfx, like what is done for dojo._base
- Option to remove the script tag after the script loads. Does that help memory? Does it work in all browsers?
- Allow plugins to only implement methods it needs to use, but only if there is minimal/no impact on require.js
- de-dupe plugins in a build, make sure they are only included once? Or does that work already now with
the latest changes?
- Make sure text plugin works offline.
- Make sure text plugin works in rhino env.
- Get Blackberry simulator. Blackberry greater than 4.6, and particulary with the Blackberry 9500 simulator (with OS v4.7),
install and launch Blackberry MDS service simulator before running simulator to get network.
- trying to find path of the file executed, as given to rhino:
http://groups.google.com/group/jsdoc-2/msg/b1dd2f8991156fa0
- with appName, and no native require, setting path to be outside the baseUrl meant that the require path was really
relative to the output folder name?
- Use JSDoc to document a full module?
- loading more than one locale for a page. A locales= option? Need this for full
Dojo conversion.
- When doing docs via jsdoc, using {some/module} as return types? How does JSDoc deal with the nested objects?
Probably needs custom work to get it recognize the module concept thing.
- To validate with Caja: http://caja.appspot.com/ and paste the code inside a script tag.
Considered, but not implemented
-------------------------------
- Bryan: test if document load and document domcontentloaded. Safari 3 has trouble, can do addEventListener, but no DOMContentLoaded?
Tested existing code (uses window load and document domcontentloaded, and require.ready fires correctly in Safari 3.2.3 on Windows, so this is not a high priority
item.
- Look at module function call during recurse instead of building up the ordered
array of modules. It was there to prevent issues with small call stacks in older Safaris,
but now that should not be a problem. Not a big decrease in file size to switching,
but just means there is fewer looping going on, so bulk perf gain? But it is just one
loop reduction, small to the amount of function calling going on? Complicates build
system too, where it overrides callModules to get the list of modules.