Closed
Bug 669486
Opened 13 years ago
Closed 13 years ago
Both the Style Inspctor and GCLI use the same template engine, but different copies of it
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jwalker, Assigned: jwalker)
Details
(Whiteboard: [best:1d, likely:1d, worst:2d])
No description provided.
Assignee | ||
Comment 1•13 years ago
|
||
Here's what I think we need to do:
- Tweak it so the implementation is static
(i.e. a single function or set of functions)
- Move it out into a JSM
- Have the Style Inspector import it
- For GCLI:
- Tweak dryice to allow several implementation of the same module
- Create a new templater module that just defers to a JSM
- Ensure that we can package a built in templater for html
and the proxied one for firefox
- Ensure the in-tree version is commented to point out the other
versions of the same code
Comment 2•13 years ago
|
||
In my naivety I thought that once the templater was in a JSM both tools could import and use it. I guess the GCLI is a special case :o/
Assignee | ||
Comment 3•13 years ago
|
||
If only we had Harmony modules, this would be easy ....
Comment 4•13 years ago
|
||
why can't you use the JSM?
Comment 5•13 years ago
|
||
(In reply to comment #4)
> why can't you use the JSM?
Because gcli is also used in other web apps (such as ace).
Comment 6•13 years ago
|
||
(In reply to comment #1)
> Here's what I think we need to do:
> - Tweak it so the implementation is static
> (i.e. a single function or set of functions)
> - Move it out into a JSM
> - Have the Style Inspector import it
> - For GCLI:
> - Tweak dryice to allow several implementation of the same module
> - Create a new templater module that just defers to a JSM
> - Ensure that we can package a built in templater for html
> and the proxied one for firefox
> - Ensure the in-tree version is commented to point out the other
> versions of the same code
Or just have the Firefox dryice build ignore the templater requirement, and have a check in the code like this:
var DomTemplate = require('path/to/dom-template');
if (!DomTemplate) {
if (typeof Components === 'object'
&& typeof Components.utils === 'object'
&& typeof Components.utils.import === 'funciton') {
Components.utils.import('resource:///path/to/dom-template');
} else {
throw new Error('blah blah blah');
}
}
Not sure if that is cleaner though...
Assignee | ||
Comment 7•13 years ago
|
||
Or half way:
- Have dryice ignore the templater requirement
- Add to prefix-gcli.jsm:
var x = {};
Components.utils.import('resource:///path/to/dom-template', x);
define('path/to/dom-template', [], function(exports) {
exports.DomTemplate = x.DomTemplate;
});
That way all the client code can just import and be done.
Comment 8•13 years ago
|
||
That seems best to me, for sure.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → jwalker
Whiteboard: [minotaur][best:1d, likely:1d, worst:2d]
Assignee | ||
Updated•13 years ago
|
Blocks: GCLI-FUTURE
Comment 9•13 years ago
|
||
Joe: I have already moved DOM Templater into a jsm as part of bug 582596. I will submit the new patch in the next couple of days.
Assignee | ||
Comment 10•13 years ago
|
||
Thanks Mike - please tell me when I can sync up.
Comment 11•13 years ago
|
||
Okay ... I will move it to devtools/shared and let you know when Dolske approves the patch.
Assignee | ||
Updated•13 years ago
|
Summary: Both the Style Inspctor and GCLI use the same template engine, but difference copies of it → Both the Style Inspctor and GCLI use the same template engine, but different copies of it
Updated•13 years ago
|
Whiteboard: [minotaur][best:1d, likely:1d, worst:2d] → [best:1d, likely:1d, worst:2d]
Assignee | ||
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Status: RESOLVED → VERIFIED
Assignee | ||
Updated•13 years ago
|
No longer blocks: GCLI-FUTURE
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•