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

Unified Diff: chrome/third_party/jstemplate/compile.py

Issue 11971042: Move chrome\third_party\jstemplate to third_party\jstemplate since it's used from ui\. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 11 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 | « chrome/third_party/jstemplate/README.chromium ('k') | chrome/third_party/jstemplate/exports.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/third_party/jstemplate/compile.py
===================================================================
--- chrome/third_party/jstemplate/compile.py (revision 177458)
+++ chrome/third_party/jstemplate/compile.py (working copy)
@@ -1,44 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Combines the javascript files needed by jstemplate into a single file."""
-
-import httplib
-import urllib
-
-
-def main():
- srcs = ['util.js', 'jsevalcontext.js', 'jstemplate.js', 'exports.js']
- out = 'jstemplate_compiled.js'
-
- # Wrap the output in an anonymous function to prevent poluting the global
- # namespace.
- output_wrapper = '(function(){%s})()'
-
- # Define the parameters for the POST request and encode them in a URL-safe
- # format. See http://code.google.com/closure/compiler/docs/api-ref.html for
- # API reference.
- params = urllib.urlencode(
- map(lambda src: ('js_code', file(src).read()), srcs) +
- [
- ('compilation_level', 'ADVANCED_OPTIMIZATIONS'),
- ('output_format', 'text'),
- ('output_info', 'compiled_code'),
- ])
-
- # Always use the following value for the Content-type header.
- headers = {'Content-type': 'application/x-www-form-urlencoded'}
- conn = httplib.HTTPConnection('closure-compiler.appspot.com')
- conn.request('POST', '/compile', params, headers)
- response = conn.getresponse()
- out_file = file(out, 'w')
- out_file.write(output_wrapper % response.read())
- out_file.close()
- conn.close()
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())
« no previous file with comments | « chrome/third_party/jstemplate/README.chromium ('k') | chrome/third_party/jstemplate/exports.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698