Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: mojo/public/sky/convert_amd_modules_to_sky.py

Issue 697723003: Switch "html" Mojo modules to the Sky module system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/sky/BUILD.gn ('k') | mojo/public/tools/bindings/generators/js_templates/module.html.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/sky/convert_amd_modules_to_sky.py
diff --git a/mojo/public/html/convert_amd_modules_to_html.py b/mojo/public/sky/convert_amd_modules_to_sky.py
similarity index 92%
rename from mojo/public/html/convert_amd_modules_to_html.py
rename to mojo/public/sky/convert_amd_modules_to_sky.py
index 20254b87248600ac232a53aeae4f2a40fb56e6bf..87348f9ea4925069927fb1193ed757eb5f0a47a2 100755
--- a/mojo/public/html/convert_amd_modules_to_html.py
+++ b/mojo/public/sky/convert_amd_modules_to_sky.py
@@ -7,9 +7,9 @@ import argparse
import sys
import re
-IMPORT_TEMPLATE = '<link rel="import" href="/%s.html" as="%s" />'
+IMPORT_TEMPLATE = '<link rel="import" href="/%s.sky" as="%s" />'
PREAMBLE_TEMPLATE = '<script>'
-POSTAMBLE_TEMPLATE = ' this.exports = exports;\n</script>'
+POSTAMBLE_TEMPLATE = ' module.exports = exports;\n</script>'
class Import(object):
def __init__(self, path, name):
@@ -42,7 +42,7 @@ def AddImportNames(module, unparsed_names):
module.imports[i].name = names[i]
def RewritePathNames(path):
- return path.replace("mojo/public/js/bindings", "mojo/public/html")
+ return path.replace("mojo/public/js/bindings", "mojo/public/sky")
def Parse(amd_module):
module = Module()
« no previous file with comments | « mojo/public/sky/BUILD.gn ('k') | mojo/public/tools/bindings/generators/js_templates/module.html.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698