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

Unified Diff: tools/create_sdk.py

Issue 8786009: Move JSON to its own lib directory in sdk. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | « frog/reader.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/create_sdk.py
===================================================================
--- tools/create_sdk.py (revision 2042)
+++ tools/create_sdk.py (working copy)
@@ -26,6 +26,9 @@
# ........html.dart
# ......htmlimpl/
# ........htmlimpl.dart
+# ......json/
+# ........json_{compiler, frog}.dart
+# ........{compiler, frog}/
# ......(more will come here - io, etc)
# ....tools/
# ......dartdoc/
@@ -59,6 +62,11 @@
(eval(open("frog/lib/frog_coreimpl_sources.gypi").read()))['sources']
coreimpl_runtime_sources = \
(eval(open("runtime/lib/lib_impl_sources.gypi").read()))['sources']
+ json_compiler_sources = \
+ (eval(open("compiler/jsonlib_sources.gypi").read())) \
+ ['variables']['jsonlib_resources']
+ json_frog_sources = \
+ (eval(open("frog/lib/frog_json_sources.gypi").read()))['sources']
HOME = dirname(dirname(realpath(__file__)))
@@ -156,7 +164,35 @@
copytree(join(html_src_dir, 'generated'), join(target_dir, 'generated'),
ignore=ignore_patterns('.svn'))
+
#
+ # Create and populate lib/json.
+ #
+
+ json_frog_dest_dir = join(LIB, 'json', 'frog')
+ json_compiler_dest_dir = join(LIB, 'json', 'compiler')
+ os.makedirs(json_frog_dest_dir)
+ os.makedirs(json_compiler_dest_dir)
+
+ for filename in json_frog_sources:
+ copyfile(join(HOME, 'frog', 'lib', filename),
+ join(json_frog_dest_dir, filename))
+
+ for filename in json_compiler_sources:
+ copyfile(join(HOME, 'compiler', filename),
+ join(json_compiler_dest_dir, os.path.basename(filename)))
+
+ # Create json_compiler.dart and json_frog.dart from whole cloth.
+ dest_file = open(join(LIB, 'json', 'json_compiler.dart'), 'w')
+ dest_file.write('#library("dart:json");\n')
+ dest_file.write('#import("compiler/json.dart");\n')
+ dest_file.close()
+ dest_file = open(join(LIB, 'json', 'json_frog.dart'), 'w')
+ dest_file.write('#library("dart:json");\n')
+ dest_file.write('#import("frog/json.dart");\n')
+ dest_file.close()
+
+ #
# Create and populate lib/dom.
#
dom_src_dir = join(HOME, 'client', 'dom')
« no previous file with comments | « frog/reader.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698