Skip to content

Latest commit

 

History

History
107 lines (74 loc) · 3.62 KB

README.dev.md

File metadata and controls

107 lines (74 loc) · 3.62 KB

Developer notes

Technology stack

  • Single Page App: The cffinit app will be a SPA. So app feels like a native app and no server-side code needs to run.
  • Figma: A vector graphics and prototyping editor used to developed the wireframes and interaction designs.
  • npm CLI: Package manager command line interface shipped with NodeJS.
  • TypeScript: Typed JavaScript language used for lowering maintenance cost.
  • Vue.js v3: A frontend JS framework for building user interfaces.
  • Vue.js Composition API: Is style of writing UI components to group logical concerns like state management.
  • Quasar: A UI framework, a group of UI components, that follow Material design guidelines to make a coherent/pleasing user interface.
  • Quasar CLI: Build and test infrastructure. Combines well with Vue.js, Quasar and jest.
  • GitHub pages: Hosting of static HTML files. The build app (in docs folder) is deployed on it.
  • Husky: Automaticly runs checks before pushing changes to GitHub.
  • Jest: Testing framework to run unit tests and perform test assertions.
  • highlight.js: To syntax highlight the YAML formatted file.
  • ESLint: To get constistent code style and prevent errors the industry standard linter ESLint is used.

The notes about how we came to this technology stack, design and personas can be found in project-docs/ folder.

Clone the repository

# clone this repository
git clone https://github.com/citation-file-format/cff-initializer-javascript
# change directory
cd cffinit

install dependencies

The command below will install dependencies

npm clean-install

start the development server

npm run dev

Use a browser to navigate to localhost:8080 to see the website.

build the application

The command below will build the application and save the output in docs/ folder.

npm run build

linting the code

npm run lint

try to automatically fix linting issues with

npm run lint -- --fix

To run linting on commit, you can install a git commit hook with

npx husky install

Tests

We use Jest for unit tests. To run unit tests (test/jest/__tests__/**/*.jest.spec.ts)

You can run the test with

npm run test:unit:ci

You can also use the Majestic web interface to run the unit tests in your browser.

npm run test:unit:ui

Making a release

This section describes how to make a release in 2 parts:

  1. preparation
  2. making a release on GitHub

(1/2) Preparation

  1. Verify that the information in CITATION.cff is correct
  2. Generate an updated version of .zenodo.json if needed using cffconvert
  3. Make sure the version field in package.json is correct
  4. By running npm run lint make sure the linter does not complain
  5. Run the unit tests with npm run test:unit:ci
  6. Make sure that github.io page is up to date
  7. Check whether the Publish workflow worked recently and it was successful

(2/2) GitHub

Make a release on GitHub.