Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a491bcbc
Commit
a491bcbc
authored
Nov 07, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36 from devoncarew/add_flutter_yaml
add a flutter.yaml file to the init template
parents
d86fb66e
a4690209
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
executable.dart
packages/flutter_tools/lib/executable.dart
+3
-2
flutter_command_runner.dart
...lutter_tools/lib/src/commands/flutter_command_runner.dart
+1
-1
init.dart
packages/flutter_tools/lib/src/commands/init.dart
+8
-2
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+1
-1
No files found.
packages/flutter_tools/lib/executable.dart
View file @
a491bcbc
...
...
@@ -32,10 +32,11 @@ Future main(List<String> args) async {
// This level can be adjusted by users through the `--verbose` option.
Logger
.
root
.
level
=
Level
.
WARNING
;
Logger
.
root
.
onRecord
.
listen
((
LogRecord
record
)
{
String
level
=
record
.
level
.
name
.
toLowerCase
();
if
(
record
.
level
>=
Level
.
WARNING
)
{
stderr
.
writeln
(
record
.
message
);
stderr
.
writeln
(
'
$level
:
${record.message}
'
);
}
else
{
print
(
record
.
message
);
print
(
'
$level
:
${record.message}
'
);
}
if
(
record
.
error
!=
null
)
stderr
.
writeln
(
record
.
error
);
...
...
packages/flutter_tools/lib/src/commands/flutter_command_runner.dart
View file @
a491bcbc
...
...
@@ -49,7 +49,7 @@ class FlutterCommandRunner extends CommandRunner {
argParser
.
addFlag
(
'local-build'
,
negatable:
false
,
help:
'Automatically detect your engine src directory from an overridden Flutter package.'
'Automatically detect your engine src directory from an overridden Flutter package.
'
'Useful if you are building Flutter locally and are using a dependency_override for'
'the Flutter package that points to your engine src directory.'
);
argParser
.
addOption
(
'engine-src-path'
,
hide:
true
,
...
...
packages/flutter_tools/lib/src/commands/init.dart
View file @
a491bcbc
...
...
@@ -89,6 +89,7 @@ abstract class Template {
class
FlutterSimpleTemplate
extends
Template
{
FlutterSimpleTemplate
()
:
super
(
'flutter-simple'
,
'A minimal Flutter project.'
)
{
files
[
'.gitignore'
]
=
_gitignore
;
files
[
'flutter.yaml'
]
=
_flutterYaml
;
files
[
'pubspec.yaml'
]
=
_pubspec
;
files
[
'README.md'
]
=
_readme
;
files
[
'lib/main.dart'
]
=
_libMain
;
...
...
@@ -98,9 +99,8 @@ class FlutterSimpleTemplate extends Template {
String
_normalizeProjectName
(
String
name
)
{
name
=
name
.
replaceAll
(
'-'
,
'_'
).
replaceAll
(
' '
,
'_'
);
// Strip any extension (like .dart).
if
(
name
.
contains
(
'.'
))
{
if
(
name
.
contains
(
'.'
))
name
=
name
.
substring
(
0
,
name
.
indexOf
(
'.'
));
}
return
name
;
}
...
...
@@ -134,6 +134,12 @@ dev_dependencies:
sky_tools: any
'''
;
const
String
_flutterYaml
=
r''
'
name: {{projectName}}
material-design-icons:
- name: content/add
'''
;
const
String
_libMain
=
r''
'
import '
package:
flutter
/
material
.
dart
';
...
...
packages/flutter_tools/pubspec.yaml
View file @
a491bcbc
...
...
@@ -28,7 +28,7 @@ dependencies:
# See also https://github.com/dart-lang/pub/issues/1356
dev_dependencies
:
mockito
:
"
^0.10.1"
mockito
:
^0.10.1
# Add the bin/sky_tools.dart script to the scripts pub installs.
executables
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment