Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
make_all_examples_cpp.py
Go to the documentation of this file.
1#! /usr/bin/env python
2# Copyright 2019 Google LLC.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5''' Run this script to re-generate the `all_examples.cpp` file after adding or
6 deleting example fiddles. '''
7import glob
8import os
9os.chdir(os.path.dirname(__file__))
10with open('all_examples.cpp', 'w') as o:
11 o.write('// Copyright 2019 Google LLC.\n// Use of this source code is '
12 'governed by a BSD-style license that can be found in the '
13 'LICENSE file.\n')
14 for path in sorted(glob.glob('../../docs/examples/*.cpp')):
15 # strip ../../
16 path = path[6:]
17 o.write('#include "%s"\n' % path)