We recommend using Volar VSCode extension for improved development experience. The project uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
cd <some dir>
git clone https://github.com/ardc-fair-checklist/ardc-fair-checklist.github.io .
npm install
npm run build
: build the project for production, output files in./dist
npm run coverage
: run the tests once and calculate coverage using@vitest/coverage-c8
npm run dev
: build the project for development, watch files for changes, serve output files onlocalhost
.npm run lint
: runeslint
with configuration from.eslintrc
npm run prod
: shorthand fornpm run build && npm run server:prod
npm run server
: serve the development buildnpm run server:prod
: serve the production buildnpm run test
: run the unit tests in watch mode usingvitest
relevant version info from npm list
:
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @vitejs/[email protected]
├── @vue/[email protected]
├── @vue/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
In the current app, there are multiple entities that could be versioned, namely the software questions JSON and the software questions app. The DRY (Don't Repeat Yourself) principle would suggest to make one app that can be used to render any version of the questions. However, this becomes more difficult to maintain as more versions of the questions are introduced. We therefore chose to have one directory for each version. That one directory contains all the components, along with all the data needed to render the app for that particular version of the questions. Naturally, this comes at the cost of having duplicate code between versions. Each version is assigned its own route, and can choose to do its own processing on supplied query parameters. Only the contents of public/
, renderer/
, and server/
are shared across versions.
There is a GitHub action /.github/workflows/publishing.yml
that builds the project for production and hosts it at https://fairsoftwarechecklist.net/, which is owned by Netherlands eScience Center. The GitHub action can be triggered manually via the GitHub user interface.
Don't make GitHub releases manually, instead let the zenodraft
workflow do it. See #92.
See #92 for avoiding a problem when publishing.
There is a GitHub action /.github/workflows/zenodraft.yml
that publishes a snapshot of main
to Zenodo, makes a release on GitHub, and tags the corresponding SHA. The workflow purposely does not finalize the depostion on Zenodo. It must be published manually by clicking the "Publish" button on Zenodo after inspection of the draft's metadata. The GitHub action can be triggered manually via the GitHub user interface.
Let's say the current latest version is v0.2
, and the version you want to make is v1
. You would do the following:
cd <project root>
cp -r pages/v0.2 pages/v1
Then, add the new version string to the relevant part of the state in versions.ts
:
nano renderer/versions.ts
where it says
['v0.1', 'v0.2']
add the next version identifier:
['v0.1', 'v0.2', 'v1']
Start the development server:
npm run dev
Check browser:
# add BASE_URL if you have it enabled, see vite.config.js
open http://localhost:3000
Now make whatever changes you want under pages/v1
. The page should update
through hot module reloading. Existing badges that point to any version that isn't
the latest should still resolve to the correct (older) version page, but will now display a message prompting users to update.