Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
dist_dart_pkg Namespace Reference

Functions

 main ()
 

Detailed Description

Copy a Dart package into a directory suitable for release.

Function Documentation

◆ main()

dist_dart_pkg.main ( )

Definition at line 15 of file dist_dart_pkg.py.

15def main():
16 parser = argparse.ArgumentParser(description='Copy a Dart package')
17
18 parser.add_argument('--source', type=str, help='Source directory assembled by dart_pkg.py')
19 parser.add_argument('--dest', type=str, help='Destination directory for the package')
20
21 args = parser.parse_args()
22
23 if os.path.exists(args.dest):
24 shutil.rmtree(args.dest)
25
26 # dart_pkg.py will create a packages directory within the package.
27 # Do not copy this into the release output.
28 shutil.copytree(args.source, args.dest, ignore=shutil.ignore_patterns('packages'))
29
30
Definition main.py:1