mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-07-29 15:19:33 -04:00
Compatibility for Closure Compiler. (#1240)
This commit is contained in:
parent
5b4537a1e6
commit
a119cca83b
8 changed files with 21 additions and 47 deletions
25
build.py
25
build.py
|
@ -337,31 +337,6 @@ class Gen_compressed(threading.Thread):
|
|||
|
||||
code = HEADER + "\n" + json_data["compiledCode"]
|
||||
code = code.replace(remove, "")
|
||||
|
||||
# Trim down Google's Apache licences.
|
||||
# The Closure Compiler used to preserve these until August 2015.
|
||||
# Delete this in a few months if the licences don't return.
|
||||
LICENSE = re.compile("""/\\*
|
||||
|
||||
[\w ]+
|
||||
|
||||
(Copyright \\d+ Google Inc.)
|
||||
https://developers.google.com/blockly/
|
||||
|
||||
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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue