forked from requirejs/requirejs
/
tasks.txt
291 lines (204 loc) · 11 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
Release Notes
--------
* Node now supported, and is the default. build.sh is now Node based. If wanting Java, buildj.sh
* Rhino build is slower than before.
* UglifyJS does not do dead code removal, so has() stuff not so useful.
* Node adapter now assumes old node modules always on require.paths: em.com.
* baseUrlMatch is now gone.
* new baseUrl rules: no longer relative to require.js. It is relative to page,
but then if a data-main is found, that directory for that data-main is used.
Explicit setting of baseUrl trumps all.
- Test on Node 0.3, adjust optimization docs if special considerations.
- update to jQuery 1.5: or just put in the version detection?
- File bug for UglifyJS on dead code removal.
- "libs/static.lib.02", //kaaahhhhnnnn!!!
- build jquery, but use allplugins file, specify an order dependency,
the build breaks because of partial order! plugin evaluation. Need to
discard plugin definitions that are partial and load a complete source of it.
*** This has implications for splitting out the plugins?
- Build the optimizer as its own project, at least enough to take out the
work from jquery-require-sample
- Test build scripts on windows.
- coffeescript plugin
- plugins in excludeShallow do not work, are not excluded. For example text! one.
- Update AMD page to mention require scanning means only do them at the top.
- Consider patches in jetpack for:
- removing scanning
- add amd object
- add plugins?
- Move up plugins, or move them to their own repo?
- How to use with Dojo page: http://trac.dojotoolkit.org/ticket/12200
- From Richard Backhouse: As an FYI I have been doing my own investigation of using UglifyJS for compression
and one thing I found when trying to compress dojo 1.5 code was that I had ensure that "make_seqs"
flag was set to false when calling ast_squeeze. If I left this flag set to true the code would not load.
- Support Node's "extensions" mechanism.
- Don't put use strict at the top of files? https://github.com/jrburke/requirejs/issues#issue/61
- Build with requireplugins-jquery.js uses bad definition for require/text, probably other plugins. Use a jqueryStub.js
for builds that need it with plain define, and allow the build system to load
the plugins. A problem, since previously built layers with plugins in them
can cause a problem.
- replacement for modify that intercepts callbacks, holds off until another module loads them?
- build tool to rename require and define calls to other names?
- building with packages.build.js, the alpha/replace path mapping does not work out?
- Update info on path resolution, fix Configuration Options link on page.
- build's name insertion if there is comment between define( and the [dependencies]
- ending slash in paths should throw error: https://github.com/jrburke/requirejs/issues/issue/49/
- Document new closure compiler options from neonstalwart
- require.modify alternative syntax/patch.
- has.js plugins
- require.def patch: https://github.com/jrburke/requirejs/pull/50
- Visualization of dependencies, highlighting circular dependencies: RobbertAtWork
- 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.