-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.yaml
More file actions
208 lines (194 loc) · 5.53 KB
/
package.yaml
File metadata and controls
208 lines (194 loc) · 5.53 KB
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
name: jbeam-edit
version: 0.0.5.0
github: webdevred/jbeam-edit
license: BSD-3-Clause
author: webdevred
maintainer: example@example.com
copyright: 2025 webdevred
data-files: examples/jbfl/*.jbfl
language: GHC2021
extra-source-files:
- README.md
- JBFL_DOCS.md
- examples/README.md
- examples/jbeam/*.jbeam
- examples/formatted_jbeam/*.jbeam
category: Command Line, Jbeam, Beamng
synopsis: A fast and reliable command-line tool for parsing, formatting, and editing
JBeam files, supporting consistent node renaming, reference updating, and JBFL-based
formatting.
description: >-
jbeam-edit is a Haskell-based CLI utility for BeamNG JBeam files. It parses complete
JBeam structures, preserves comments and whitespace, formats files consistently,
and can automatically rename nodes and update references. Custom formatting rules
are supported via JBFL (JBeam Formatting Language). See the README for usage instructions
and examples: https://github.com/webdevred/jbeam-edit#readme
tested-with: [GHC == 9.6.6, GHC == 9.10.3]
dependencies:
- base >= 4.18 && < 4.22
- bytestring
- vector >= 0.13
- text >= 2.1.2
- containers
- scientific
- directory >= 1.3.8.0
- filepath >= 1.5.1.0
- mtl
default-extensions:
- OverloadedStrings
- ImportQualifiedPost
- DerivingStrategies
- TupleSections
ghc-options:
- -Wall
- -Wcompat
- -Widentities
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-export-lists
- -Wmissing-home-modules
- -Wpartial-fields
- -Wredundant-constraints
when:
- condition: '! flag(lsp-server) && ! flag(transformation) && ! flag(dump-ast)'
dependencies: [containers >= 0.8]
- condition: os(windows)
ghc-options: -optc-Os -optl-static
flags:
dump-ast:
description: Enable building the dump-ast executable (dev-only)
manual: true
default: false
transformation:
description: Enable transformation (experimental)
manual: true
default: false
lsp-server:
description: Enable LSP server (experimental)
manual: true
default: false
windows-example-paths:
description: Use executable-relative example paths (for Windows release builds)
default: false
manual: true
internal-libraries:
jbeam-edit-transformation:
when:
condition: flag(transformation)
then:
dependencies:
- yaml
- file-io
- extra
- transformers
- ordered-containers >= 0.2.4
else:
buildable: false
source-dirs: src-extra/transformation
dependencies: [jbeam-edit]
jbeam-language-server:
default-extensions: [DataKinds, PolyKinds]
when:
condition: flag(lsp-server)
then:
dependencies: [lsp >= 2.7, co-log-core,aeson]
else:
buildable: false
source-dirs: src-extra/language-server
dependencies: [jbeam-edit]
library:
ghc-options: [-Wunused-packages]
source-dirs: src
generated-other-modules: Paths_jbeam_edit
dependencies: [extra >= 1.7.13, megaparsec, file-io]
when:
- condition: flag(transformation)
cpp-options: -DENABLE_TRANSFORMATION
- condition: os(windows) && flag(windows-example-paths)
cpp-options: -DWINDOWS_EXAMPLE_PATHS
- condition: os(windows)
cpp-options: -DENABLE_WINDOWS_NEWLINES
_jbeam-lsp-common: &jbeam-lsp-common
main: Main.hs
dependencies: [jbeam-edit]
_jbeam-options: &jbeam-options
main: Main.hs
ghc-options: [-threaded, -rtsopts, -with-rtsopts=-N]
executables:
jbeam-edit:
<<: *jbeam-options
source-dirs: exe/jbeam-edit
default-extensions: [CPP]
dependencies: [jbeam-edit]
when:
- condition: flag(transformation)
dependencies: [jbeam-edit-transformation]
cpp-options: -DENABLE_TRANSFORMATION
jbeam-lsp-server:
source-dirs: exe/jbeam-lsp-server
when:
condition: flag(lsp-server)
then:
dependencies: [jbeam-language-server]
else:
buildable: false
<<:
- *jbeam-options
- *jbeam-lsp-common
jbeam-edit-dump-ast:
<<: *jbeam-options
when:
condition: (flag(dump-ast) && flag(transformation))
then:
dependencies: [pretty-simple >= 4, jbeam-edit-transformation]
else:
buildable: false
source-dirs: tools/dump_ast
ghc-options: [-threaded, -rtsopts, -with-rtsopts=-N]
dependencies: [jbeam-edit]
benchmarks:
jbeam-edit-bench:
<<: *jbeam-options
source-dirs: tools/bench
dependencies: [base, jbeam-edit]
when:
- condition: flag(transformation)
then:
dependencies: [criterion, jbeam-edit-transformation]
else:
buildable: false
_jbeam-test-common: &jbeam-test-common
<<: *jbeam-options
main: Spec.hs
build-tools: [hspec-discover]
dependencies: [jbeam-edit, hspec]
tests:
jbeam-edit-test:
<<: *jbeam-test-common
source-dirs: test
when:
- condition: true
dependencies: [megaparsec, hspec-megaparsec]
jbeam-language-server-test:
<<: *jbeam-test-common
source-dirs: test-extra/language-server
when:
- condition: flag(lsp-server)
then:
build-tools: jbeam-edit:jbeam-lsp-server
dependencies: [jbeam-language-server, lsp-test, lsp >= 2.7]
else:
buildable: false
jbeam-edit-transformation-test:
<<: *jbeam-test-common
main: Spec.hs
build-tools: []
source-dirs: test-extra/transformation
when:
- condition: true
ghc-options: -main-is Spec
- condition: flag(transformation)
then:
dependencies: [jbeam-edit-transformation]
else:
buildable: false