-
Notifications
You must be signed in to change notification settings - Fork 303
/
storybook.tiltfile
93 lines (79 loc) · 2.14 KB
/
storybook.tiltfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Enforce versioning so that labels are supported
version_settings(constraint='>=0.22.1')
# Uncomment to try the cancel button extension
#v1alpha1.extension_repo(name='default', url='file:///home/nick/src/tilt-extensions')
#v1alpha1.extension(name='cancel', repo_name='default', repo_path='cancel')
load("ext://uibutton", "cmd_button", "location")
enable_feature("offline_snapshot_creation")
local_resource(
'install',
'yarn install')
local_resource(
'storybook',
serve_cmd='yarn run storybook -- --ci',
links=['http://localhost:9009/'],
readiness_probe=probe(http_get=http_get_action(port=9009)),
labels=["frontend"],
resource_deps=['install'])
local_resource(
'check:prettier',
'cd .. && make prettier',
auto_init=False,
trigger_mode=TRIGGER_MODE_MANUAL,
labels=["lint"],
resource_deps=['install'])
local_resource(
'watch:tsc',
serve_cmd='yarn tsc -w',
auto_init=False,
allow_parallel=True,
labels=["lint"],
resource_deps=['install'])
local_resource(
'check:check-js',
'cd .. && make check-js',
auto_init=False,
trigger_mode=TRIGGER_MODE_MANUAL,
allow_parallel=True,
labels=["lint"],
resource_deps=['install'])
local_resource(
'test:test-js',
'cd .. && make test-js',
auto_init=False,
trigger_mode=TRIGGER_MODE_MANUAL,
labels=["test"],
allow_parallel=True,
resource_deps=['install'])
local_resource(
'test:update-snapshots',
'CI=true yarn test -u',
auto_init=False,
trigger_mode=TRIGGER_MODE_MANUAL,
labels=["test"],
resource_deps=['install'])
# Add button versions for the local resources on Storybook resource
cmd_button(
name='2prettier',
resource='storybook',
argv=['sh', '-c', 'tilt trigger check:prettier'],
text='Run prettier',
location=location.RESOURCE,
icon_name='cleaning_services',
)
cmd_button(
name='1ts-compile',
resource='storybook',
argv=['sh', '-c', 'tilt trigger check:tsc'],
text='Verify compile',
location=location.RESOURCE,
icon_name='handyman',
)
cmd_button(
name='3check-js',
resource='storybook',
argv=['sh', '-c', 'tilt trigger check:check-js'],
text='Check lint + compile',
location=location.RESOURCE,
icon_name='card_giftcard',
)