forked from rodydavis/pocketbase_drift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yaml
58 lines (53 loc) · 2.16 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This configures how `build_runner` and associated builders should behave.
# For more information, see https://pub.dev/packages/build_config
targets:
$default:
# Reducing sources makes the build slightly faster (some of these are required
# to exist in the default target).
sources:
- lib/**
- web/**
- "tool/**"
- pubspec.yaml
- lib/$lib$
- $package$
builders:
drift_dev:
# These options change how drift generates code
options:
# Drift analyzes SQL queries at compile-time. For this purpose, it needs to know which sqlite3
# features will be available. We depend on `sqlite3_flutter_libs`, which lets us use the latest
# version with fts5 enabled.
sql:
dialect: sqlite
options:
version: "3.38"
modules:
- json1
- fts5
# This allows us to share a drift database across isolates (or different tabs on the web)
generate_connect_constructor: true
# These options are generally recommended: https://drift.simonbinder.eu/docs/advanced-features/builder_options/#recommended-options
apply_converters_on_variables: true
generate_values_in_copy_with: true
scoped_dart_components: true
case_from_dart_to_sql: preserve
# # Configuring this builder isn't required for most apps. In our case, we
# # want to compile the web worker in `web/worker.dart` to JS and we use the
# # build system for that.
# build_web_compilers:entrypoint:
# generate_for:
# - web/worker.dart
# options:
# compiler: dart2js
# ":copy_compiled_worker_js":
# enabled: true
# # build_web_compilers writes a hidden asset, but we want an asset in `web/` for
# # flutter to see. So, copy that output. Again, this is not needed for most apps.
# builders:
# copy_compiled_worker_js:
# import: 'tool/builder.dart'
# builder_factories: ["CopyCompiledJs.new"]
# build_to: source
# build_extensions: {'web/worker.dart.js': ['web/shared_worker.dart.js']}
# required_inputs: [".dart.js"]