rename sky ==> flutter in the starting app template
This commit is contained in:
parent
5c9413d0f6
commit
c35c06e6f2
@ -13,7 +13,8 @@ import 'package:path/path.dart' as p;
|
|||||||
|
|
||||||
class InitCommand extends Command {
|
class InitCommand extends Command {
|
||||||
final name = 'init';
|
final name = 'init';
|
||||||
final description = 'Create a new sky project.';
|
final description = 'Create a new Flutter project.';
|
||||||
|
|
||||||
InitCommand() {
|
InitCommand() {
|
||||||
argParser.addOption('out', abbr: 'o', help: 'The output directory.');
|
argParser.addOption('out', abbr: 'o', help: 'The output directory.');
|
||||||
argParser.addFlag('pub',
|
argParser.addFlag('pub',
|
||||||
@ -32,7 +33,7 @@ class InitCommand extends Command {
|
|||||||
// TODO: Confirm overwrite of an existing directory with the user.
|
// TODO: Confirm overwrite of an existing directory with the user.
|
||||||
Directory out = new Directory(argResults['out']);
|
Directory out = new Directory(argResults['out']);
|
||||||
|
|
||||||
new SkySimpleTemplate().generateInto(out);
|
new FlutterSimpleTemplate().generateInto(out);
|
||||||
|
|
||||||
print('');
|
print('');
|
||||||
|
|
||||||
@ -89,8 +90,8 @@ abstract class Template {
|
|||||||
String toString() => name;
|
String toString() => name;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SkySimpleTemplate extends Template {
|
class FlutterSimpleTemplate extends Template {
|
||||||
SkySimpleTemplate() : super('sky-simple', 'A minimal Sky project.') {
|
FlutterSimpleTemplate() : super('flutter-simple', 'A minimal Flutter project.') {
|
||||||
files['.gitignore'] = _gitignore;
|
files['.gitignore'] = _gitignore;
|
||||||
files['pubspec.yaml'] = _pubspec;
|
files['pubspec.yaml'] = _pubspec;
|
||||||
files['README.md'] = _readme;
|
files['README.md'] = _readme;
|
||||||
@ -124,8 +125,8 @@ const _readme = r'''
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
For help getting started with Sky, view our online
|
For help getting started with Flutter, view our online
|
||||||
[documentation](https://github.com/domokit/sky_engine/blob/master/sky/packages/sky/README.md).
|
[documentation](http://flutter.io/).
|
||||||
''';
|
''';
|
||||||
|
|
||||||
const _pubspec = r'''
|
const _pubspec = r'''
|
||||||
@ -145,7 +146,7 @@ void main() => runApp(new HelloWorldApp());
|
|||||||
class HelloWorldApp extends App {
|
class HelloWorldApp extends App {
|
||||||
Widget build() {
|
Widget build() {
|
||||||
return new Scaffold(
|
return new Scaffold(
|
||||||
toolbar: new ToolBar(center: new Text("Sky Demo")),
|
toolbar: new ToolBar(center: new Text("Flutter Demo")),
|
||||||
body: new Material(child: new Center(child: new Text("Hello world!"))),
|
body: new Material(child: new Center(child: new Text("Hello world!"))),
|
||||||
floatingActionButton: new FloatingActionButton(
|
floatingActionButton: new FloatingActionButton(
|
||||||
child: new Icon(type: 'content/add', size: 24)));
|
child: new Icon(type: 'content/add', size: 24)));
|
||||||
|
@ -24,7 +24,7 @@ defineTests() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Verify that we create a project that is well-formed.
|
// Verify that we create a project that is well-formed.
|
||||||
test('init sky-simple', () async {
|
test('init flutter-simple', () async {
|
||||||
InitCommand command = new InitCommand();
|
InitCommand command = new InitCommand();
|
||||||
CommandRunner runner = new CommandRunner('test_flutter', '')
|
CommandRunner runner = new CommandRunner('test_flutter', '')
|
||||||
..addCommand(command);
|
..addCommand(command);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user