| Index: chrome/browser/resources/touch_ntp/tools/check
|
| diff --git a/chrome/browser/resources/touch_ntp/tools/check b/chrome/browser/resources/touch_ntp/tools/check
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..50d884af88f90353f2a1e2a0ef1954aab3aca084
|
| --- /dev/null
|
| +++ b/chrome/browser/resources/touch_ntp/tools/check
|
| @@ -0,0 +1,33 @@
|
| +#!/bin/bash
|
| +
|
| +# Copyright (c) 2008 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.
|
| +
|
| +# This script checks the touch_ntp code for common errors and style
|
| +# problems using the closure compiler (jscompiler) and closure linter
|
| +# (gjslint) - both of which must be on the path.
|
| +# See http://code.google.com/closure/compiler/ and
|
| +# http://code.google.com/closure/utilities/ for details on these tools.
|
| +
|
| +# Note that we throw away the output from jscompiler since it's use
|
| +# is not yet common in Chromium and for now we want it to be an optional
|
| +# tool for helping to find bugs, not something that actually changes
|
| +# the embedded JavaScript (making it harder to debug, for example).
|
| +
|
| +SOURCES="eventtracker.js touchhandler.js slider.js newtab.js grabber.js "
|
| +SOURCES+="standalone/standalone_hack.js"
|
| +
|
| +ARGS="--warning_level VERBOSE"
|
| +ARGS+=" --js_output_file /dev/null"
|
| +for S in $SOURCES tools/externs.js; do
|
| + ARGS+=" --js $S"
|
| +done
|
| +
|
| +cd `dirname $0`/..
|
| +
|
| +echo jscompiler $ARGS
|
| +jscompiler $ARGS || exit 1
|
| +
|
| +echo gjslint $SOURCES
|
| +gjslint $SOURCES || exit 1
|
|
|