Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packagerChrome.py

Issue 29399569: Issue 5060 - Move require into modules template, make info a module (Closed)
Patch Set: Addressed more feedback Created March 31, 2017, 3:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | packagerEdge.py » ('j') | templates/modules.js.tmpl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerChrome.py
diff --git a/packagerChrome.py b/packagerChrome.py
index a6555c932a237643011f271336ad7bfe4315f844..5e5b4ea90b3468bdef9455948842b27d307403cb 100644
--- a/packagerChrome.py
+++ b/packagerChrome.py
@@ -138,14 +138,6 @@ def createManifest(params, files):
return manifest.encode('utf-8')
-def createInfoModule(params):
- if params['type'] == 'gecko-webext':
- template = getTemplate('geckoInfo.js.tmpl')
- else:
- template = getTemplate('chromeInfo.js.tmpl')
- return template.render(params).encode('utf-8')
-
-
def convertJS(params, files):
output_files = collections.OrderedDict()
args = {}
@@ -183,7 +175,10 @@ def convertJS(params, files):
files[filename] = template.render(
args=current_args,
- modules=modules
+ basename=params['metadata'].get('general', 'basename'),
+ modules=modules,
+ type=params['type'],
+ version=params['metadata'].get('general', 'version')
).encode('utf-8')
@@ -396,11 +391,6 @@ def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil
files.read(os.path.join(buildtools.__path__[0], 'chromeDevenvPoller__.js'), relpath='devenvPoller__.js')
files['devenvVersion__'] = str(random.random())
- if (metadata.has_option('general', 'backgroundScripts') and
- 'lib/info.js' in metadata.get('general', 'backgroundScripts').split() and
- 'lib/info.js' not in files):
- files['lib/info.js'] = createInfoModule(params)
-
if metadata.has_option('general', 'testScripts'):
files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl',
('general', 'testScripts'))
« no previous file with comments | « no previous file | packagerEdge.py » ('j') | templates/modules.js.tmpl » ('J')

Powered by Google App Engine
This is Rietveld