mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Normalize import paths for Sky modules
This CL simplifies the sky_server to only map the build directory into /gen, which will make the deploy script simpler. This CL updates all the imports to use the /gen prefix when referring to generated files. TBR=eseidel@chromium.org Review URL: https://codereview.chromium.org/881093003
This commit is contained in:
parent
bf64f39c29
commit
63b6ffb281
@ -1,4 +1,4 @@
|
||||
<import src="/sky/framework/shell.sky" as="shell" />
|
||||
<import src="shell.sky" as="shell" />
|
||||
<script>
|
||||
function connectToEmbedderService(service, client) {
|
||||
var handle = internals.connectToEmbedderService(service.name);
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<import src="/mojo/public/sky/connection.sky" as="connection" />
|
||||
<import src="/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/mojo/public/sky/support.sky" as="support" />
|
||||
<import src="/mojo/public/interfaces/application/shell.mojom.sky" as="shellMojom" />
|
||||
<import src="/mojo/services/public/sky/shell.sky" as="shell" />
|
||||
<import src="/sky/services/inspector/inspector.mojom.sky" as="inspector" />
|
||||
<import src="/gen/mojo/public/interfaces/application/shell.mojom.sky" as="shellMojom" />
|
||||
<import src="/gen/mojo/public/sky/connection.sky" as="connection" />
|
||||
<import src="/gen/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/gen/mojo/public/sky/support.sky" as="support" />
|
||||
<import src="/gen/mojo/services/public/sky/shell.sky" as="shell" />
|
||||
<import src="/gen/sky/services/inspector/inspector.mojom.sky" as="inspector" />
|
||||
<import src="console-agent.sky" as="ConsoleAgent" />
|
||||
<import src="dom-agent.sky" as="DOMAgent" />
|
||||
<import src="page-agent.sky" as="PageAgent" />
|
||||
<import src="worker-agent.sky" as="WorkerAgent" />
|
||||
<import src="runtime-agent.sky" as="RuntimeAgent" />
|
||||
<import src="indexeddb-agent.sky" as="IndexedDBAgent" />
|
||||
<import src="css-agent.sky" as="CSSAgent" />
|
||||
<import src="dom-agent.sky" as="DOMAgent" />
|
||||
<import src="indexeddb-agent.sky" as="IndexedDBAgent" />
|
||||
<import src="page-agent.sky" as="PageAgent" />
|
||||
<import src="runtime-agent.sky" as="RuntimeAgent" />
|
||||
<import src="worker-agent.sky" as="WorkerAgent" />
|
||||
<script>
|
||||
class InspectorBackend extends inspector.InspectorBackend.stubClass {
|
||||
constructor(frontend) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<import src="../xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
class Page {
|
||||
constructor(delegate) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<import src="/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/mojo/public/sky/connection.sky" as="connection" />
|
||||
<import src="/gen/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/gen/mojo/public/sky/connection.sky" as="connection" />
|
||||
<script>
|
||||
function wrapHandle(handle, service, client) {
|
||||
return connection.bindProxyHandle(handle, service.client, service);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
-->
|
||||
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="sky-element/sky-element.sky" as="SkyElement" />
|
||||
|
||||
<sky-element name="sky-box" attributes="title:string">
|
||||
<template>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
-->
|
||||
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="sky-element/sky-element.sky" as="SkyElement" />
|
||||
|
||||
<sky-element
|
||||
name="sky-button"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
-->
|
||||
<import src="/sky/framework/sky-button.sky" as="SkyButton" />
|
||||
<import src="sky-button.sky" as="SkyButton" />
|
||||
|
||||
<sky-element
|
||||
name="sky-checkbox"
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
-->
|
||||
<import src="/sky/framework/shell.sky" as="shell" />
|
||||
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="/mojo/services/keyboard/public/interfaces/keyboard.mojom.sky" as="keyboard" />
|
||||
<import src="/gen/mojo/services/keyboard/public/interfaces/keyboard.mojom.sky" as="keyboard" />
|
||||
<import src="shell.sky" as="shell" />
|
||||
<import src="sky-element/sky-element.sky" as="SkyElement" />
|
||||
|
||||
<sky-element name="sky-input" attributes="value:string">
|
||||
<template>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
-->
|
||||
<import src="/sky/framework/sky-button.sky" as="SkyButton" />
|
||||
<import src="sky-button.sky" as="SkyButton" />
|
||||
|
||||
<sky-element
|
||||
name="sky-radio"
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
-->
|
||||
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="/sky/framework/fling-curve.sky" as="FlingCurve" />
|
||||
<import src="sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="fling-curve.sky" as="FlingCurve" />
|
||||
|
||||
<sky-element
|
||||
name="sky-scrollable"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<import src="/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/mojo/public/sky/unicode.sky" as="unicode" />
|
||||
<import src="/mojo/services/network/public/interfaces/network_service.mojom.sky" as="net" />
|
||||
<import src="/mojo/services/network/public/interfaces/url_loader.mojom.sky" as="loader" />
|
||||
<import src="/sky/framework/shell.sky" as="shell" />
|
||||
<import src="/gen/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/gen/mojo/public/sky/unicode.sky" as="unicode" />
|
||||
<import src="/gen/mojo/services/network/public/interfaces/network_service.mojom.sky" as="net" />
|
||||
<import src="/gen/mojo/services/network/public/interfaces/url_loader.mojom.sky" as="loader" />
|
||||
<import src="shell.sky" as="shell" />
|
||||
<script>
|
||||
// XHR keeps itself alive.
|
||||
var outstandingRequests = new Set();
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<sky>
|
||||
<import src="/sky/tests//resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<import src="../resources/test-element.sky" as="TestElement" />
|
||||
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
|
||||
<import src="/sky/tests/resources/test-element.sky" as="TestElement" />
|
||||
|
||||
<div id="sandbox"></div>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<sky>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe("xmlhttprequest.responseType", function() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<sky>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe("xmlhttprequest.responseType", function() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe('XMLHttpRequest', function() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<sky>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe("xmlhttprequest", function() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe('XMLHttpRequest', function() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../../resources/chai.sky" />
|
||||
<import src="../../resources/mocha.sky" />
|
||||
<import src="/sky/framework/xmlhttprequest.sky" as="XMLHttpRequest" />
|
||||
<script>
|
||||
describe('XMLHttpRequest', function() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="/sky/tests/resources/chai.sky" />
|
||||
<import src="/sky/tests/resources/mocha.sky" />
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<import src="/sky/framework/inspector/page-agent.sky" as="PageAgent" />
|
||||
<img src='does_not_exist.jpg' />
|
||||
<script>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<import src="/mojo/services/input_events/public/interfaces/input_event_constants.mojom.sky" as="constants" />
|
||||
<import src="/mojo/services/input_events/public/interfaces/input_events.mojom.sky" as="events" />
|
||||
<import src="/mojo/services/input_events/public/interfaces/input_key_codes.mojom.sky" as="codes" />
|
||||
<import src="/gen/mojo/services/input_events/public/interfaces/input_event_constants.mojom.sky" as="constants" />
|
||||
<import src="/gen/mojo/services/input_events/public/interfaces/input_events.mojom.sky" as="events" />
|
||||
<import src="/gen/mojo/services/input_events/public/interfaces/input_key_codes.mojom.sky" as="codes" />
|
||||
<import src="/gen/sky/services/testing/test_harness.mojom.sky" as="harness" />
|
||||
<import src="/sky/framework/shell.sky" as="shell" />
|
||||
<import src="/sky/services/testing/test_harness.mojom.sky" as="harness" />
|
||||
<script>
|
||||
var harness = shell.connectToService("mojo:sky_tester", harness.TestHarness);
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<import src="/mojo/public/sky/buffer.sky" as="buffer" />
|
||||
<import src="/gen/mojo/public/sky/buffer.sky" as="buffer" />
|
||||
<div id="result">FAIL</div>
|
||||
<script>
|
||||
document.getElementById("result").textContent =
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<import src="/mojo/public/sky/codec.sky" as="codec" />
|
||||
<import src="/gen/mojo/public/sky/codec.sky" as="codec" />
|
||||
<div id="result">FAIL</div>
|
||||
<script>
|
||||
document.getElementById("result").textContent =
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<import src="../resources/dump-as-text.sky" />
|
||||
<import src="/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/gen/mojo/public/sky/core.sky" as="core" />
|
||||
<div id="result">FAIL</div>
|
||||
<script>
|
||||
document.getElementById("result").textContent =
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<sky>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<import src="/mojo/services/input_events/public/interfaces/input_event_constants.mojom.sky" as="constants" />
|
||||
<import src="/mojo/services/input_events/public/interfaces/input_events.mojom.sky" as="events" />
|
||||
<import src="/gen/mojo/services/input_events/public/interfaces/input_event_constants.mojom.sky" as="constants" />
|
||||
<import src="/gen/mojo/services/input_events/public/interfaces/input_events.mojom.sky" as="events" />
|
||||
<import src="/gen/sky/services/testing/test_harness.mojom.sky" as="harness" />
|
||||
<import src="/sky/framework/shell.sky" as="shell" />
|
||||
<import src="/sky/services/testing/test_harness.mojom.sky" as="harness" />
|
||||
|
||||
<script>
|
||||
describe('Sky event sender', function() {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<html>
|
||||
<import src="../resources/chai.sky" />
|
||||
<import src="../resources/mocha.sky" />
|
||||
<import src="/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/mojo/public/sky/connection.sky" as="connection" />
|
||||
<import src="/mojo/services/network/public/interfaces/network_service.mojom.sky" as="net" />
|
||||
<import src="/mojo/services/network/public/interfaces/url_loader.mojom.sky" as="loader" />
|
||||
<import src="/mojo/services/public/sky/shell.sky" as="shell" />
|
||||
<import src="/mojo/public/interfaces/application/shell.mojom.sky" as="shellMojom" />
|
||||
<import src="/gen/mojo/public/interfaces/application/shell.mojom.sky" as="shellMojom" />
|
||||
<import src="/gen/mojo/public/sky/connection.sky" as="connection" />
|
||||
<import src="/gen/mojo/public/sky/core.sky" as="core" />
|
||||
<import src="/gen/mojo/services/network/public/interfaces/network_service.mojom.sky" as="net" />
|
||||
<import src="/gen/mojo/services/network/public/interfaces/url_loader.mojom.sky" as="loader" />
|
||||
<import src="/gen/mojo/services/public/sky/shell.sky" as="shell" />
|
||||
<script>
|
||||
const Shell = shell.Shell;
|
||||
|
||||
|
||||
@ -78,12 +78,5 @@ func main() {
|
||||
|
||||
addMapping("/gen/", genRoot)
|
||||
|
||||
// FIXME: Unclear if these are correct now that we have /gen.
|
||||
// /gen is more explicit, but also is less like how a 3rd party might
|
||||
// deploy a sky app.
|
||||
addMapping("/mojo/public/", path.Join(genRoot, "mojo", "public"))
|
||||
addMapping("/mojo/services/", path.Join(genRoot, "mojo", "services"))
|
||||
addMapping("/sky/services/", path.Join(genRoot, "sky", "services"))
|
||||
|
||||
http.ListenAndServe(":" + port, nil)
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
7d2cceb778d3bfd4a710915de8721d10cc89b155
|
||||
00d7f2d6508392278439de82914b9299a85632c1
|
||||
Loading…
x
Reference in New Issue
Block a user