mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Automatic commit Fri Jan 31 03:00:02 PST 2014
This commit is contained in:
22
build.py
22
build.py
@@ -287,6 +287,28 @@ class Gen_compressed(threading.Thread):
|
||||
code = HEADER + '\n' + json_data['compiledCode']
|
||||
code = code.replace(remove, '')
|
||||
|
||||
# Trim down Google's Apache licences.
|
||||
LICENSE = re.compile("""/\\*
|
||||
|
||||
[\w ]+
|
||||
|
||||
(Copyright \\d+ Google Inc.)
|
||||
https://blockly.googlecode.com/
|
||||
|
||||
Licensed under the Apache License, Version 2.0 \(the "License"\);
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
\\*/""")
|
||||
code = re.sub(LICENSE, r"\n// \1 Apache License 2.0", code)
|
||||
|
||||
stats = json_data['statistics']
|
||||
original_b = stats['originalSize']
|
||||
compressed_b = stats['compressedSize']
|
||||
|
||||
Reference in New Issue
Block a user