Commit 3a138caa authored by Colin Blundell's avatar Colin Blundell

Create wrapper script around mojom's generate.dart in the Sky package.

This CL does the following:
- Moves mojom's generate.dart from bin/ to lib/ to make it available for use
  by a wrapper scripts in the Sky package, thus avoiding all consumers of Sky
  needing to directly depend on mojom to be able to call
  "pub run mojom:generate".
- Adds a sky->mojom pub dependency and creates a wrapper script around mojom's
  generate.dart in the Sky package.
- Augments the Sky README to explain the usage of this script.

R=eseidel@chromium.org, sethladd@google.com

Review URL: https://codereview.chromium.org/1136503002
parent 09183a7f
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/*
* This script should be invoked via 'pub run' after 'pub get':
* $ pub run sky:init
* NOTE: The 'dart' executable must be on your $PATH for this script to work.
*/
import 'dart:io';
main(List<String> arguments) {
ProcessResult result = Process.runSync('dart', ['-p', 'packages', 'packages/mojom/generate.dart']);
stdout.write(result.stdout);
stderr.write(result.stderr);
}
...@@ -5,3 +5,4 @@ homepage: https://github.com/domokit/mojo/tree/master/sky ...@@ -5,3 +5,4 @@ homepage: https://github.com/domokit/mojo/tree/master/sky
version: 0.0.5 version: 0.0.5
dependencies: dependencies:
mojo: '>=0.0.1 <1.0.0' mojo: '>=0.0.1 <1.0.0'
mojom: '>=0.0.4 <1.0.0'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment