summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 22:59:59 +0000
committergarykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-29 22:59:59 +0000
commit7dbf4018b31b218f67df3cb87ffb2344b522a5c8 (patch)
tree13068d34c23b71557953ddd3ddb2c86b95fa3eee
parent64348eae94a2d07e923aaa0262b6c47947ffa3b3 (diff)
downloadchromium_src-7dbf4018b31b218f67df3cb87ffb2344b522a5c8.zip
chromium_src-7dbf4018b31b218f67df3cb87ffb2344b522a5c8.tar.gz
chromium_src-7dbf4018b31b218f67df3cb87ffb2344b522a5c8.tar.bz2
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
-rw-r--r--remoting/remoting.gyp41
1 files changed, 35 insertions, 6 deletions
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',