From 7dbf4018b31b218f67df3cb87ffb2344b522a5c8 Mon Sep 17 00:00:00 2001 From: "garykac@chromium.org" Date: Wed, 29 Jan 2014 22:59:59 +0000 Subject: Add jscompile action for remoting webapp build target. This action does a sanity check of the JavaScript files to make sure that the types are used consistently. The jscompile build target is off by default. Use run_jscompile=1 to enable. BUG= R=jamiewalch@chromium.org Review URL: https://codereview.chromium.org/149043003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247770 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/remoting.gyp | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'remoting') diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 6e968ed..713ee4c 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -6,6 +6,9 @@ 'variables': { 'chromium_code': 1, + # Set this to run the jscompile checks after building the webapp. + 'run_jscompile%': 0, + 'variables': { 'conditions': [ # Enable the multi-process host on Windows by default. @@ -178,6 +181,8 @@ 'remoting_webapp_apps_v2_js_files': [ 'webapp/background.js', ], + 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp', + 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip', }, 'dependencies': [ 'remoting_resources', @@ -202,12 +207,36 @@ 'remoting_host_plugin', ], }], + ['run_jscompile != 0', { + 'variables': { + 'success_stamp': '<(PRODUCT_DIR)/remoting_webapp_jscompile.stamp', + }, + 'actions': [ + { + 'action_name': 'Verify remoting webapp', + 'inputs': [ + '<@(remoting_webapp_js_files)', + '<@(remoting_webapp_js_proto_files)', + # Include zip as input so that this action is run after the build. + '<(zip_path)', + ], + 'outputs': [ + '<(success_stamp)', + ], + 'action': [ + 'python', 'tools/htmlcompile.py', + '<(output_dir)/main.html', + '<@(remoting_webapp_js_proto_files)', + '--success-stamp', + '<(success_stamp)' + ], + }, + ], # actions + }], ], 'actions': [ { 'action_name': 'Build Remoting WebApp', - 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp', - 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip', 'inputs': [ 'webapp/build-webapp.py', '<(chrome_version_path)', @@ -223,16 +252,16 @@ }], ], 'outputs': [ - '<(_output_dir)', - '<(_zip_path)', + '<(output_dir)', + '<(zip_path)', ], 'action': [ 'python', 'webapp/build-webapp.py', '<(buildtype)', '<(version_full)', '<(host_plugin_mime_type)', - '<(_output_dir)', - '<(_zip_path)', + '<(output_dir)', + '<(zip_path)', '<(plugin_path)', '<@(remoting_webapp_files)', '--locales', -- cgit v1.1