>>dart create hello
( >>dart create --template console-full hello )
>>cd hello
bin\hello.dart
=========
void main() {
print('Hello, Dart!');
}
>>dart run
>>dart run --enable-asserts
>>dart compile exe ./bin/hello.dart
dart -h
A command-line utility for Dart development.
Usage: dart [<vm-flags>] <command|dart-file> [<arguments>]
Global options:
-h, --help Print this usage information.
-v, --verbose Show additional command output.
--version Print the Dart SDK version.
--enable-analytics Enable anonymous analytics.
--disable-analytics Disable anonymous analytics.
Available commands:
analyze Analyze the project's Dart code.
compile Compile Dart to various formats.
create Create a new project.
fix Apply automated fixes to Dart source code.
format Idiomatically format Dart source code.
migrate Perform a null safety migration on a project or package.
pub Work with packages.
run Run a Dart program.
test Run tests in this package.
dart create -h
Create a new project.
Usage: dart create [arguments] <directory>
-h, --help Print this usage information.
-t, --template The project template to use.
[console-simple (default), console-full, package-simple, web-simple]
--[no-]pub Whether to run 'pub get' after the project has been created.
(defaults to on)
--force Force project generation, even if the target directory already exists.
Available templates:
console-simple: A simple command-line application. (default)
console-full: A command-line application sample.
package-simple: A starting point for Dart libraries or applications.
web-simple: A web app that uses only core Dart libraries.
dart compile -h
Compile Dart to various formats.
Usage: dart compile <subcommand> [arguments]
-h, --help Print this usage information.
Available subcommands:
aot-snapshot Compile Dart to an AOT snapshot.
exe Compile Dart to a self-contained executable.
jit-snapshot Compile Dart to a JIT snapshot.
js Compile Dart to JavaScript.
kernel Compile Dart to a kernel snapshot.
Комментариев нет:
Отправить комментарий