Flutter Engine
The Flutter Engine
Functions | Variables
update_sources Namespace Reference

Functions

def getDir (rootdir, target)
 
def main ()
 

Variables

string HEADER
 

Function Documentation

◆ getDir()

def update_sources.getDir (   rootdir,
  target 
)

Definition at line 14 of file update_sources.py.

14def getDir(rootdir, target):
15 sources = []
16 for root, subdirs, files in os.walk(rootdir):
17 subdirs.sort()
18 files.sort()
19 for f in files:
20 sources.append(root + '/' + f)
21 return sources
22
23
def getDir(rootdir, target)

◆ main()

def update_sources.main ( )

Definition at line 34 of file update_sources.py.

34def main():
35 with open('observatory_sources.gni', 'w') as target:
36 target.write(HEADER)
37 target.write('observatory_sources = [\n')
38 sources = []
39 for rootdir in ['lib', 'web']:
40 sources.extend(getDir(rootdir, target))
41 sources.sort()
42 for s in sources:
43 if (s[-9:] != 'README.md'):
44 target.write(' "' + s + '",\n')
45 target.write(']\n')
46
47

Variable Documentation

◆ HEADER

string update_sources.HEADER
Initial value:
1= """# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
3# BSD-style license that can be found in the LICENSE file.
4
5# DO NOT EDIT. This file is generated by update_sources.py in this directory.
6
7# This file contains all dart, css, and html sources for Observatory.
8"""

Definition at line 24 of file update_sources.py.