Skip to content

Commit 3aaea81

Browse files
committed
Rename gulp local to dev
1 parent 6a64281 commit 3aaea81

File tree

5 files changed

+57
-39
lines changed

5 files changed

+57
-39
lines changed

README.md

+41-24
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,35 @@ npm run build
5959

6060
This doesn't copy it anywhere, just runs a compile and build
6161

62-
### Create a distribution file
63-
64-
This creates a `dist.zip` (you can rename it in the `.env` file) after running a compile.
65-
You can modify the `gulpfile.mjs` to include other files in the `dist/` directory - this
66-
directory is simply zipped and placed into the `dist/` directory. You can then configure
67-
Github Actions to then upload this zip somewhere for ACARS to download.
68-
6962
#### Automatically build and copy to ACARS
7063

71-
This will setup a watch, and then automatically transpile and then copy the contents of the
72-
`dist` folder into the `ACARS_PROFILE_PATH` directory that's defined in the `.env` file.
64+
This will setup a watch, and then automatically transpile and then copy the
65+
contents of the
66+
`dist` folder into the `ACARS_PROFILE_PATH` directory that's defined in the
67+
`.env` file.
7368

7469
```shell
7570
npm run dev
7671
```
7772

73+
### Create a distribution file
74+
75+
Running:
76+
77+
```shell
78+
npm run dist
79+
```
80+
81+
Creates a `dist.zip` (you can rename it in the `.env` file) after running a
82+
compile. You can modify the `gulpfile.mjs` to include other files - by default,
83+
anything in the `dist` directory gets packaged. You can then configure
84+
Github Actions to then upload this zip somewhere for ACARS to download.
85+
7886
### Disable Downloading Latest Defaults
7987

80-
Sometimes, it's just useful to disable downloading of the latest defaults, and just edit the scripts that are included
81-
to see how they work. To do that, create a file in your `Documents/vmsacars` directory, called `appsettings.local.json`,
88+
Sometimes, it's just useful to disable downloading of the latest defaults, and
89+
just edit the scripts that are included to see how they work. To do that, create
90+
a file in your `Documents/vmsacars` directory, called `appsettings.local.json`,
8291
and place the following:
8392

8493
```json filename="appsettings.local.json"
@@ -96,7 +105,8 @@ and place the following:
96105
}
97106
```
98107

99-
You can also adjust the log level to "Information", "Debug" or "Verbose" ("Debug" is recommended)
108+
You can also adjust the log level to "Information", "Debug" or "Verbose"
109+
("Debug" is recommended)
100110

101111
---
102112

@@ -106,8 +116,8 @@ There are several core files/interfaces that are included:
106116

107117
### `src/global.d.ts`
108118

109-
This describes the globally available functions, including the logging methods available through `console` and
110-
`Acars`.
119+
This describes the globally available functions, including the logging methods
120+
available through `console` and `Acars`.
111121

112122
### `src/types.d.ts`
113123

@@ -117,13 +127,15 @@ This contains all of the base types:
117127
- `Telemetry` - telemetry information that's come out of the simulator
118128
- `User` - information about the current user
119129

120-
It also includes other detailed type information, for example `Length`, so you can retrieve that type of information.
130+
It also includes other detailed type information, for example `Length`, so you
131+
can retrieve that type of information.
121132

122133
---
123134

124135
## Aircraft Configuration:
125136

126-
Aircraft rules are required to inherit the `AircraftConfig` abstract class. An example class would look like:
137+
Aircraft rules are required to inherit the `AircraftConfig` abstract class. An
138+
example class would look like:
127139

128140
```typescript
129141
import { AircraftConfigSimType, AircraftFeature, FeatureType } from '../defs'
@@ -175,9 +187,12 @@ The configuration is a class which has a few different components.
175187
- `AircraftConfigSimType.MsFs20`
176188
- `AircraftConfigSimType.MsFs24`
177189
- `enabled`
178-
- `priority` - from 1 (lowest) to 10 (highest). If there are multiple rules which match this, then which one takes
179-
priority. All the built-in rules are at a priority 1, and aircraft specifics rules are priority 2. I recommend
180-
using a priority of 3 or higher. More on this below
190+
- `priority` - from 1 (lowest) to 10 (highest).
191+
- If there are multiple rules that match this, then which one takes
192+
priority.
193+
- All the built-in rules are at a priority 1
194+
- Aircraft specifics rules are priority 2.
195+
- I recommend using a priority of 3 or higher. More on this below
181196
2. `features` - this is the type `FeatureAddresses` - see `defs.ts` for the definitions
182197
- MSFS - the lookups you enter are LVars
183198
- X-Plane - the looks ups are via datarefs
@@ -193,16 +208,18 @@ The configuration is a class which has a few different components.
193208
5. Methods for the different features (see below)
194209
- The maps - a group of datarefs or offsets which constitute that feature being "on" or "enabled"
195210

196-
In the above example, for the Fenix A320, the landing lights are controlled by two datarefs, both of which the
197-
values need to be 1 or 2 for the landing lights to be considered "on".
211+
In the above example, for the Fenix A320, the landing lights are controlled by
212+
two datarefs, both of which the values need to be 1 or 2 for the landing lights
213+
to be considered "on".
198214

199215
#### Targeting MSFS
200216

201217
There are 3 possible values for targetting MSFS in the configs:
202218

203-
- `AircraftConfigSimType.MsFs` - This will apply the configuration to both 2020 and 2024
204-
- `AircraftConfigSimType.MsFs20` - This will be for 2020 ONLY
205-
- `AircraftConfigSimType.MsFs24` - This will be for 2024 ONLY
219+
- `AircraftConfigSimType.MsFs` - This will apply the configuration to both 2020
220+
and 2024
221+
- `AircraftConfigSimType.MsFs20` - This will be for 2020 ONLY
222+
- `AircraftConfigSimType.MsFs24` - This will be for 2024 ONLY
206223

207224
### Features
208225

gulpfile.mjs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import dotconfig from '@dotenvx/dotenvx'
22
import { deleteSync as del } from 'del'
3+
import fs from 'fs'
34
import { dest, series, src, watch } from 'gulp'
45
import eslint from 'gulp-eslint-new'
5-
import ts from 'gulp-typescript'
66
import prettier from 'gulp-prettier'
7+
import ts from 'gulp-typescript'
78
import zip from 'gulp-zip'
8-
import tap from 'gulp-tap'
9-
import minify from 'gulp-minify'
10-
import fs from 'fs'
119

1210
dotconfig.config()
1311

@@ -57,7 +55,7 @@ export const dist = series(
5755
* documents/vmsacars/data/<profile>/config directory
5856
* @public
5957
*/
60-
export const local = localBuildTask
58+
export const dev = localBuildTask
6159

6260
/**
6361
* The build steps that run from the csproj

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
"clean": "gulp clean",
1010
"copy": "gulp copy",
1111
"csbuild": "gulp csbuild",
12+
"dev": "gulp dev",
1213
"dist": "gulp dist",
1314
"export": "gulp dist",
1415
"format": "prettier --ignore-path .gitignore --write \"src/**/*.+(js|ts)\"",
1516
"lint": "eslint --fix",
16-
"local": "gulp local",
17+
"local": "gulp dev",
1718
"testing": "gulp testing",
1819
"tsbuild": "tsc --build"
1920
},

src/types/global.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { RuleValue } from './rule'
21
import { AircraftFeature } from '../defs'
2+
import { RuleValue } from './rule'
33

44
declare global {
55
namespace Acars {

src/types/types.d.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import { EngineType } from '../defs'
2-
import { AircraftFeature } from '../defs'
3-
import { AircraftType } from '../defs'
4-
import { FlightPlanType } from '../defs'
5-
import { GateType } from '../defs'
6-
import { SimType } from '../defs'
7-
import { PirepState } from '../defs'
8-
import { Surface } from '../defs'
1+
import {
2+
AircraftFeature,
3+
AircraftType,
4+
EngineType,
5+
FlightPlanType,
6+
GateType,
7+
PirepState,
8+
SimType,
9+
Surface,
10+
} from '../defs'
911

1012
/** Point-in-time telemetry from the aircraft */
1113
export interface Telemetry {

0 commit comments

Comments
 (0)