mirror of
https://github.com/google/blockly.git
synced 2026-01-15 12:57:12 +01:00
feat(demos): Use freshly-built files
Use the freshly-built dist/*_compresssed.js and build/msg/* files rather than using the checked-in files in the repository root. This helps ensure that these demos are using the most recent version of Blockly (even in the develop branch).
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="target-densitydpi=device-dpi, height=660, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Blockly Demo: Blockly Developer Tools</title>
|
||||
<script src="../../blockly_compressed.js"></script>
|
||||
<script src="../../javascript_compressed.js"></script>
|
||||
<script src="../../msg/js/en.js"></script>
|
||||
<script src="../../blocks_compressed.js"></script>
|
||||
<script src="../../dist/blockly_compressed.js"></script>
|
||||
<script src="../../dist/blocks_compressed.js"></script>
|
||||
<script src="../../dist/javascript_compressed.js"></script>
|
||||
<script src="../../build/msg/en.js"></script>
|
||||
<script src="analytics.js"></script>
|
||||
<script src="block_definition_extractor.js"></script>
|
||||
<script src="factory_utils.js"></script>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<title>Blockly Demo: Block Factory</title>
|
||||
<script src="/storage.js"></script>
|
||||
<script src="factory.js"></script>
|
||||
<script src="../../blockly_compressed.js"></script>
|
||||
<script src="../../msg/js/en.js"></script>
|
||||
<script src="../../dist/blockly_compressed.js"></script>
|
||||
<script src="../../build/msg/en.js"></script>
|
||||
<script src="blocks.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
|
||||
@@ -621,6 +621,6 @@ Code.discard = function() {
|
||||
// Load the Code demo's language strings.
|
||||
document.write('<script src="msg/' + Code.LANG + '.js"></script>\n');
|
||||
// Load Blockly's language strings.
|
||||
document.write('<script src="../../msg/js/' + Code.LANG + '.js"></script>\n');
|
||||
document.write('<script src="../../build/msg/' + Code.LANG + '.js"></script>\n');
|
||||
|
||||
window.addEventListener('load', Code.init);
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<title>Blockly Demo:</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="/storage.js"></script>
|
||||
<script src="../../blockly_compressed.js"></script>
|
||||
<script src="../../blocks_compressed.js"></script>
|
||||
<script src="../../javascript_compressed.js"></script>
|
||||
<script src="../../python_compressed.js"></script>
|
||||
<script src="../../php_compressed.js"></script>
|
||||
<script src="../../lua_compressed.js"></script>
|
||||
<script src="../../dart_compressed.js"></script>
|
||||
<script src="../../dist/blockly_compressed.js"></script>
|
||||
<script src="../../dist/blocks_compressed.js"></script>
|
||||
<script src="../../dist/javascript_compressed.js"></script>
|
||||
<script src="../../dist/python_compressed.js"></script>
|
||||
<script src="../../dist/php_compressed.js"></script>
|
||||
<script src="../../dist/lua_compressed.js"></script>
|
||||
<script src="../../dist/dart_compressed.js"></script>
|
||||
<script src="code.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Blockly Demo: Minimap</title>
|
||||
<script src="../../blockly_compressed.js"></script>
|
||||
<script src="../../blocks_compressed.js"></script>
|
||||
<script src="../../msg/js/en.js"></script>
|
||||
<script src="../../dist/blockly_compressed.js"></script>
|
||||
<script src="../../dist/blocks_compressed.js"></script>
|
||||
<script src="../../build/msg/en.js"></script>
|
||||
<script src="minimap.js"></script>
|
||||
<style>
|
||||
body {
|
||||
|
||||
@@ -28,16 +28,30 @@ task copyBlocklyHtmlFile(type: Copy) {
|
||||
rename('index.html', 'webview.html')
|
||||
}
|
||||
|
||||
task copyBlocklyMoreFiles(type: Copy) {
|
||||
task copyBlocklyDistFiles(type: Copy) {
|
||||
from('../../../../dist') {
|
||||
include 'blockly_compressed.js', 'blocks_compressed.js'
|
||||
}
|
||||
into project(':app').file('./src/main/assets/blockly')
|
||||
}
|
||||
|
||||
task copyBlocklyBuildFiles(type: Copy) {
|
||||
from('../../../../build') {
|
||||
include 'msg/**'
|
||||
}
|
||||
into project(':app').file('./src/main/assets/blockly')
|
||||
}
|
||||
|
||||
task copyBlocklyMediaFiles(type: Copy) {
|
||||
from('../../../..') {
|
||||
include 'blockly_compressed.js', 'blocks_compressed.js', 'msg/js/**', 'media/**'
|
||||
include 'media/**'
|
||||
exclude 'media/test_*'
|
||||
}
|
||||
into project(':app').file('./src/main/assets/blockly')
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
preBuild.dependsOn(copyBlocklyHtmlFile, copyBlocklyMoreFiles)
|
||||
preBuild.dependsOn(copyBlocklyHtmlFile, copyBlocklyBuildFiles, copyBlocklyDistFiles, copyBlocklyMediaFiles)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<script src="blockly_compressed.js"></script>
|
||||
<script src="blocks_compressed.js"></script>
|
||||
<!-- TODO: Select msg file based on locale. -->
|
||||
<script src="msg/js/en.js"></script>
|
||||
<script src="msg/en.js"></script>
|
||||
<script src="toolbox_standard.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -28,4 +28,4 @@
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
# Create symbolic links in this directory for the
|
||||
# Blockly library files used by this demo's index.html.
|
||||
|
||||
if [[ ! -e ../../../blockly_compressed.js ]]; then
|
||||
if [[ ! -e ../../../dist/blockly_compressed.js ]]; then
|
||||
echo "ERROR: Could not locate blockly_compressed.js. Run from demos/mobile/html/" 1>&2
|
||||
exit 1 # terminate and indicate error
|
||||
fi
|
||||
|
||||
if [ ! -L blockly_compressed.js ]; then
|
||||
ln -s ../../../blockly_compressed.js blockly_compressed.js
|
||||
ln -s ../../../dist/blockly_compressed.js blockly_compressed.js
|
||||
fi
|
||||
if [ ! -L blocks_compressed.js ]; then
|
||||
ln -s ../../../blocks_compressed.js blocks_compressed.js
|
||||
ln -s ../../../dist/blocks_compressed.js blocks_compressed.js
|
||||
fi
|
||||
if [ ! -L media ]; then
|
||||
ln -s ../../../media media
|
||||
fi
|
||||
if [ ! -L msg ]; then
|
||||
ln -s ../../../msg msg
|
||||
ln -s ../../../build/msg msg
|
||||
fi
|
||||
|
||||
@@ -5,10 +5,10 @@ BLOCKLY_ROOT=../../..
|
||||
IOS_RESOURCES=Resources/Non-Localized/Blockly
|
||||
|
||||
MORE_FILES_TO_COPY=(
|
||||
"blockly_compressed.js"
|
||||
"blocks_compressed.js"
|
||||
"dist/blockly_compressed.js"
|
||||
"dist/blocks_compressed.js"
|
||||
"media"
|
||||
"msg/js"
|
||||
"build/msg"
|
||||
)
|
||||
|
||||
mkdir -p $IOS_RESOURCES/media
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Blockly Demo: Cloud Storage</title>
|
||||
<script src="/storage.js"></script>
|
||||
<script src="../../blockly_compressed.js"></script>
|
||||
<script src="../../blocks_compressed.js"></script>
|
||||
<script src="../../msg/js/en.js"></script>
|
||||
<script src="../../dist/blockly_compressed.js"></script>
|
||||
<script src="../../dist/blocks_compressed.js"></script>
|
||||
<script src="../../build/msg/en.js"></script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user