Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
101 lines (71 sloc) 4.26 KB

Contributing

Thank you for contributing to TooLiP! Pull requests welcome!

Consider opening an issue for any of the following:

  • bugs
  • feature requests
  • requests for new tools

Follow these steps when preparing a pull request.

Be sure to read the General Contributing Guidelines for DLx Projects.

Coding Guidelines

This project includes an ESLint stylesheet for linting JavaScript, and a [Stylelint][11] stylesheet for linting CSS / LESS. These stylesheets help ensure consistency across developers when writing code. Please ensure that your code adheres to the included stylesheet as much as possible, and that exceptions are documented using eslint-disable or stylelint-disable as appropriate.

Guidelines for Building Tools

Each of the tools in this project should aim to eventually implement all of the following:

  • RTL and LTR text input
  • local storage / IndexedDB storage (the tool should not be strongly integrated with the DLx database)
  • import / export of data as DLx JSON files
  • offline functionality
  • a walkthrough using Intro.js
  • support for custom keyboards (interfacing with data from the Typist tool)
  • import / export to cloud services

Each tool should ideally support the most recent two versions of all of the following browsers, on desktop and mobile:

  • Chrome
  • Edge
  • Firefox
  • Safari

Releases, Versioning, & Branching

This project uses semantic versioning to track changes:

  • major: when tools are added, removed, or rewritten or undergo drastic changes
  • minor: when new features are added or removed from individual tools
  • patch: when fixes are made or the documentation is changed

GitHub releases are used to publish releases. Only major and minor releases are published. Periodically, the master branch is tagged for a release, and any user-facing changes made since the last release are summarized. This automatically publishes the release to Zenodo for citation and archiving.

This project uses a simple branching structure. For each issue, an issue branch is made from master, and then merged back into master when the changes are complete.

Project Structure

  • /.github - GitHub documentation (for developers and contributors)
  • /app - Server-side code (using Koa)
    • /config - Environment variables (see the documentation for the environment variables in the config file)
    • /middleware - Koa middleware
  • /build - Build scripts
  • /components - Each folder contains all the source code for a single Handlebars component, including style and scripts
  • /manifest - Manifests for various file types
    • icons.json - An array of Feather Icons to make available to Handlebars templates
  • /public - Static assets (CSS, JS, images, etc.) are served from this folder
  • /views - Each folder contains all the source code for a single page or tool, including style and scripts

Each tool should have a folder structure like the one below.

/{tool}

  • index.js - This file should export the server-side GET handler
  • {tool}.hbs - The Handlebars template for this page / tool
  • {tool}.js - The entry point for the client-side JavaScript
  • {tool}.less - The entry point for the LESS files

Semantic UI

The following changes need to be made to the Semantic UI LESS files for this project:

  • Rename theme.config.example > theme.config

  • Make the following changes to semantic-ui-less/themes/default/globals/site.variables

    @fontName          : var(--font);
    @fontSmoothing     : antialiased;
    
    @headerFont        : var(--font);
    @pageFont          : var(--font);
You can’t perform that action at this time.