-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbaldrick-broth.yaml
447 lines (447 loc) · 18.8 KB
/
baldrick-broth.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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
model:
project:
title: Accountancy script for very simple cases
description: CLI tool for converting a QIF bank statement to the different csv files useful for accountancy
version: 0.3.0
keywords:
- CLI
- Accountancy
readme:
highlights:
- Written in `Typescript`
- Understand QIF format
- Automatically convert rows based on search terms
links:
- "[Usage](USAGE.md)"
related:
- "[baldrick-zest-engine](https://github.com/flarebyte/baldrick-zest-engi\
ne) Run tests declaratively with a few cunning plans"
github:
account: flarebyte
name: pico-accountancy
copyright:
holder: Flarebyte.com
startYear: 2015
license: MIT
author:
name: Olivier Huin
url: https://github.com/olih
implementation:
tags:
- cli
- zest
- pest
- zod
- railway
- commander
workflow-version: 0.1.0
pest-filenames:
- cli-help
- cli
workflows:
test:
title: Test the library
description: Test the library for defects
tasks:
jest:
title: Run the unit tests with Jest
description: Use the Jest framework to run unit test (deprecated)
links:
- title: Jest is a JavaScript Testing Framework
url: https://jestjs.io/
main:
commands:
- title: Test all test files in test folder
run: npx baldrick-dev-ts test check
spec:
title: Run unit tests declaratively
description: Run unit tests for pure functions declaratively using YAML files
motivation: Check that the units of code behave as intended
links:
- title: Baldrick Zest run tests declaratively
url: https://github.com/flarebyte/baldrick-zest-engine
main:
commands:
- title: Run all baldrick zest files
run: node --loader ts-node/esm .baldrick-zest.ts
pest:
title: Run acceptance tests for the CLI
description: Run acceptance tests declaratively using YAML files
motivation: Check that the CLI application behaves as intended
links:
- title: Testing with baldrick-pest
url: https://github.com/flarebyte/baldrick-pest
main:
each:
- name: pest-filename
values: build.model.pest-filenames
commands:
- title: Run regression on file
name: Run regression on {{pest-filename}}.pest.yaml
run: npx baldrick-pest@latest test --spec-file pest-spec/{{pest-filename}}.pest.yaml
scc:
title: Count lines of code
description: Count lines of code
motivation: Count lines of code
links:
- title: Counting lines of code in many programming languages
url: https://github.com/boyter/scc
before:
commands:
- name: pest-files
title: List pest yaml files
run: scc pest-spec --include-ext yaml --by-file --format csv
onSuccess:
- save
- csv
- silent
main:
each:
- name: pest-file
values: data.test::pest::pest-files
commands:
- title: Display info
name: Display info {{pest-file.Location}}
run: echo {{pest-file.Location}}
cli:
title: Run client directly
description: Run the client with ts-node during development
motivation:
Simulate a CLI app in development without the need to install it
globally
main:
commands:
- title: Run the CLI locally
run: node --loader ts-node/esm src/cli.mts
transpile:
title: Transpile the source code
description: Transpile source code
tasks:
ts:
title: Transpile typescript
description: Generate javascript from the typescript source code
motivation: Javascript code is more portable and can be consumed by other projects
links:
- title: tsc compiles typescript defined by a tsconfig.json
url: https://www.typescriptlang.org/docs/handbook/compiler-options.html
main:
commands:
- title: Delete dist folder
run: rm -rf dist
- title: Compile with typescript
run: tsc --outDir dist
deps:
title: Library dependencies
description: Npm dependencies
tasks:
upgrade:
title: Upgrade to latest dependencies
description: Upgrade to latest npm dependencies
motivation: Keep up with security and improvements
main:
commands:
- title: Upgrade to latest dependencies
run: yarn upgrade --latest
- title: Display advice about yarn upgrade-interactive
run: echo "❐ You could also use yarn upgrade-interactive --latest"
doc:
title: Generate the documentation
description: Generate the documentation automatically
tasks:
ts:
title: Generate documentation
description: Generate the markdown documentation for the typescript project
motivation: Good documentation is essential for developer experience
links:
- title: TypeDoc converts comments in Typescript into a JSON model
url: https://typedoc.org/
- title: baldrick-doc-ts produces markdown documentation
url: https://github.com/flarebyte/baldrick-doc-ts
- title: baldrick-doc-ts produces markdown documentation
url: https://github.com/flarebyte/baldrick-doc-ts
- title: Package development of Typescript library in ESM format
url: https://github.com/flarebyte/baldrick-dev-ts
main:
commands:
- name: report-folder
title: Ensure that we have a report folder
run: mkdir -p report
- name: typedoc
title: Generate typedoc doc.json
run: npx typedoc@latest --json report/doc.json --pretty src/index.ts
- name: api
title: Generate markdown files for the Api
run: npx baldrick-doc-ts@latest typedoc --json-source report/doc.json
- name: ngram
title: Generate some markdown files with ngram
run: npx baldrick-doc-ts@latest parse -f internal ngram
- name: fix
title: Fix all the markdown files
run: npx baldrick-dev-ts@latest markdown fix
- name: github
title: Fixes markdown in github folder
run: npx baldrick-dev-ts@latest markdown fix -s .github/
github:
title: Management of the github project
description: Generate the documentation based on the source code
tasks:
standard:
title: Standardize the github repository
description: Enable useful features for the github project repository
motivation: Create consistent settings
main:
commands:
- name: edit
title: Configure usual settings for github project
run: gh repo edit --delete-branch-on-merge --enable-squash-merge
lint:
title: Static code analysis
description: Find problems in the code base
tasks:
check:
title: Static code analysis of Typescript code
description: Find problems in Typescript code
motivation: Make the code more consistent and avoid bugs
main:
commands:
- name: check
title: Lint check sources
run: npx baldrick-dev-ts@latest lint check -s src test
fix:
title: Fix static code analysis
description: Fix problems in Typescript code
motivation: Facilitate routine maintenance of code
main:
commands:
- name: fix
title: Fix source code
run: npx baldrick-dev-ts@latest lint fix -s src test
md:
title: Markdown documentation
description: Manage markdown documentation
tasks:
check:
title: Check Markdown files
description: Checks that the markdown documents follows some consistent guidelines
motivation: Make the markdown documents consistent in style
main:
commands:
- name: check
title: Check markdown files
run: baldrick markdown check
- name: github
title: Check markdown files in github
run: npx baldrick-dev-ts@latest markdown check -s .github/
fix:
title: Fix Markdown files
description:
Modify the markdown documents to ensure they follow some consistent
guidelines
motivation: Make the markdown documents consistent in style
main:
commands:
- title: Fix markdown files
run: npx baldrick-dev-ts@latest markdown fix
- title: Fix markdown files in github
run: npx baldrick-dev-ts@latest markdown fix -s .github/
release:
title: Release of the library
tasks:
ready:
title: Ready for publishing
description:
Run a sequence of commands to check that the library is ready to be
published
motivation: Detect quality flaws before pushing the code
main:
commands:
- name: release-check
title: Checks that the version has been incremented
run: npx baldrick-dev-ts@latest release check
- name: lint
title: Check linting
run: npx baldrick-dev-ts@latest lint check -s src test
- name: markdown
title: Check markdown files
run: npx baldrick-dev-ts@latest markdown check
- name: markdown-github
title: Check markdown files in github
run: npx baldrick-dev-ts@latest markdown check -s .github/
- name: outdated
title: Check whether some libraries are outdated
run: yarn outdated
- name: outdated
title: Audit some libraries
run: yarn audit
scaffold:
title: Scaffolding for the project
tasks:
upgrade:
title: Upgrade baldrick-broth configuration to latest version
description: Gets the latest version of this configuration file
motivation: Always apply the latest project conventions
main:
commands:
- title: Remove previous temporary directory
run: rm -rf temp/broth
- title: Create temporary directory
run: mkdir -p temp/broth
- a: mask-object
name: broth-model
title: Extract model from this baldrick-broth.yaml
value: build
mask: model
- title: Save baldrick-broth file with existing model
stdin: data.scaffold::upgrade::broth-model
run: sponge temp/broth/baldrick-broth-model.json
links:
- title: sponge from MoreUtils homepage
url: https://formulae.brew.sh/formula/moreutils
- title: merge model with new workflow
run: npx baldrick-whisker@latest object baldrick-broth.yaml
temp/broth/baldrick-broth-model.json
github:flarebyte:baldrick-reserve:data/ts/baldrick-broth.yaml
norm:
title: Normalize the project
description: Normalize the project in a similar fashion that the other
typescript projects
motivation: Make the project structure consistent and easier to navigate
main:
commands:
- title: Create all github repositories
run: mkdir -p .github/workflows .github/ISSUE_TEMPLATE
- title: Github - create bug report form
run:
npx baldrick-whisker@latest object .github/ISSUE_TEMPLATE/bug_report.yaml
github:flarebyte:baldrick-reserve:data/ts/bug-report.yaml
- title: Github - create feature request form
run: npx baldrick-whisker@latest object
.github/ISSUE_TEMPLATE/feature_request.yaml
github:flarebyte:baldrick-reserve:data/ts/feature-request.yaml
- title: Github - create main workflow
run: npx baldrick-whisker@latest object .github/workflows/main.yml
github:flarebyte:baldrick-reserve:data/ts/workflow-main.yml
- title: Github - create pull request configuration
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/pull-request-template.hbs
.github/pull_request_template.md
- title: Create all needed repositories
run: mkdir -p .vscode src test spec script script/data script/schema
- title: Install default vscode snippets
run: npx baldrick-whisker@latest object --no-ext
.vscode/baldrick.code-snippets.json
github:flarebyte:baldrick-reserve:data/ts/snippet.yaml
- title: Create .gitignore
links:
- title: Specify files to ignore in source control
url: https://git-scm.com/docs/gitignore
run:
npx baldrick-whisker@latest render --no-ext baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/gitignore.hbs
.gitignore.sh
- title: Create .editorconfig
run:
npx baldrick-whisker@latest render --no-ext baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/editorconfig.hbs
.editorconfig.sh
links:
- title: Maintain consistent coding styles for spaces
url: https://editorconfig.org/
- title: Create a starter .vscode/settings.json
run: npx baldrick-whisker@latest object .vscode/settings.json
github:flarebyte:baldrick-reserve:data/ts/vscode-settings.json
--no-overwrite
- title: Create tsconfig.json
run: npx baldrick-whisker@latest object tsconfig.json
github:flarebyte:baldrick-reserve:data/ts/tsconfig-2021.yaml
- title: Create .prettierrc.json
run: npx baldrick-whisker@latest object .prettierrc.json
github:flarebyte:baldrick-reserve:data/ts/prettierrc.json
- title: Create .remarkrc.yml
run: npx baldrick-whisker@latest object .remarkrc.yml
github:flarebyte:baldrick-reserve:data/ts/remarkrc.yml
- title: Create CONTRIBUTING.md with contribution guidelines
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/contributing.hbs
CONTRIBUTING.md
- title: Create CODE_OF_CONDUCT.md with code of conduct guidelines
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/code-of-conduct.hbs
CODE_OF_CONDUCT.md
- title: Create GLOSSARY.md with project vocabulary
run: npx baldrick-whisker@latest render
github:flarebyte:baldrick-reserve:data/glossary.yaml
github:flarebyte:baldrick-reserve:template/glossary.hbs
GLOSSARY.md
- title: Create a starter DECISIONS.md
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/decisions.hbs
DECISIONS.md --no-overwrite
- title: Create README.md
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/readme.hbs
README.md
- title: Create TECHNICAL_DESIGN.md
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/technical-design.hbs
TECHNICAL_DESIGN.md
- title: Create LICENSE
run:
npx baldrick-whisker@latest render --no-ext baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/license.hbs
LICENSE.md
- title: Fix markdown
run: npx baldrick-broth@latest md fix
- name: package-json
title: Backup dependencies
run: cat package.json
onSuccess:
- save
- silent
- json
- a: mask-object
title: Extracts dependencies from package.json
name: package-json-deps
value: data.scaffold::norm::package-json
mask: dependencies,devDependencies,peerDependencies
- name: save-package-json-deps
title: Save package.json with only dependencies
stdin: data.scaffold::norm::package-json-deps
run: sponge temp/broth/package-deps.json
- title: Create package.json metadata from broth model
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/package.hbs
temp/broth/package-specific.json
- title: merge dependencies with broth model info
run: npx baldrick-whisker@latest object package.json
temp/broth/package-specific.json temp/broth/package-deps.json
norm-package:
title: Normalize the project
description: Normalize the project in a similar fashion that the other
typescript projects
motivation: Make the project structure consistent and easier to navigate
main:
commands:
- name: package-json
title: Backup dependencies
run: cat package.json
onSuccess:
- save
- silent
- json
- a: mask-object
title: Extracts dependencies from package.json
name: package-json-deps
value: data.scaffold::norm-package::package-json
mask: dependencies,devDependencies,peerDependencies
- name: save-package-json-deps
title: Save package.json with only dependencies
stdin: data.scaffold::norm-package::package-json-deps
run: sponge temp/broth/package-deps.json
- title: Create package.json metadata from broth model
run: npx baldrick-whisker@latest render baldrick-broth.yaml
github:flarebyte:baldrick-reserve:template/ts/package.hbs
temp/broth/package-specific.json
- title: merge dependencies with broth model info
run: npx baldrick-whisker@latest object package.json
temp/broth/package-specific.json temp/broth/package-deps.json