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
This commit is contained in:
17
packages/flutter/bin/init.dart
Normal file
17
packages/flutter/bin/init.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
// 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
|
||||
version: 0.0.5
|
||||
dependencies:
|
||||
mojo: '>=0.0.1 <1.0.0'
|
||||
mojom: '>=0.0.4 <1.0.0'
|
||||
|
||||
Reference in New Issue
Block a user