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:
Adam Barth
2015-01-27 17:04:40 -08:00
parent 8c02bac6a8
commit 9582236903
8 changed files with 15 additions and 22 deletions

View File

@@ -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>

View File

@@ -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 =

View File

@@ -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 =

View File

@@ -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 =

View File

@@ -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() {

View File

@@ -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;

View File

@@ -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)
}

View File

@@ -1 +1 @@
7d2cceb778d3bfd4a710915de8721d10cc89b155
00d7f2d6508392278439de82914b9299a85632c1