aerofly-missions

Development

Version numbering

Before publishing a new version, be sure to change the version numbers in the following files:

  1. CHANGELOG.md
  2. dist/manifest.json
  3. dist/sw.js (this is required to reset the caching of the app)

The version number in the package.json will be automatically incremented by calling npm version ${VERSION.

Adding a new importer

  1. Add a new file to src/Import/${YOURCLASSNAME}.ts
  2. Add a new class ${YOURCLASSNAME} and extend it from GarminFpl
  3. Add a test import file to src/Tests/fixtures
  4. Add a new file to src/Tests/${YOURCLASSNAME}.test.ts (see instructions below)
  5. Add the upload file extension to the <input type="file" /> in src/Web/ComponentUploadField.ts, and add the import case for ${YOURCLASSNAME}
  6. Add the file extension to dist/manifest.json

Adding a new exporter

  1. Add a new file to src/Import/${YOURCLASSNAME}.ts
  2. Add a new class ${YOURCLASSNAME}Export and extend it from ` GarminExportAbstract`
  3. Add a new file to src/Tests/${YOURCLASSNAME}.test.ts (see instructions below)
  4. Add the download button to src/Web/ComponentsDownloadButtons.ts, and add the export case for ${YOURCLASSNAME}

Tests

  1. Tests need to be created in src/Tests/${YOURCLASSNAME}.test.ts and extend from Test (src/Cli/Test.ts)
  2. New tests need to be added to src/test.ts via tests.add(new ${YOURCLASSNAME}(process, dieOnError)) to be executed by npm test

private and protected

  1. Do not use # for private variables.
  2. Prefer protected over private.

This guides help to minimize the boilerplate code generated by TypeScript to accommodate older browsers.


Back to top