Git Product home page Git Product logo

klaw-docs's Introduction

Klaw documentation

About

This is the Klaw documentation repository. Welcome ๐Ÿ‘‹ ๐ŸŽ‰ You can find source code and all content for our (klaw-project.io site here.

We're using Docusaurus to build our documentation, an optimized site generator in React.

Installation and usage

Requirements

  • node needs to be installed. -> please check nvmrc or the engines definition in package.json for version.

This is the setup you need every time. You can find the different ways how to run the local development process below.

Optionally, we use Vale for spell checking. The spell check will run in the GitHub pipeline. If you want to use Vale locally, too, please make sure you install it:

  • It runs on Mac, Linux and Windows. You can find instructions to download and install it at their Installation guide.
  • after installation, run vale sync on root level

Local development

First, make sure you hare the required technology set up:

  • node (see above)
  • optional: Vale (see above)

The, install all needed dependencies and setup the needed githooks:

npm install

To start local the local development server, run:

npm start

Scripts used and their actions

โ„น๏ธ You can see all our scripts in the package.json. You can also run npm run in your console to get a list of all available scripts.

Please note that you have to set up your local development in order to use the scripts.

Here are the important ones you're likely to use:

  • npm start: starts the app for development
  • npm run build: will build the documentation site and generate all static files in "build". After build you can run npm run serve to test your build locally
  • npm run lint: runs a format check and if no error is found, lints code and markdown files in the project.
  • npm run reformat: runs the code formatter (Prettier) as well as the markdown linter in fix mode. This will mutate your code.
  • npm run markdown-link-check: checks if there are any broken links. Note: This requires internet connection, as it does check external links, too!
    • Run npm run markdown-link-check -- -o to only check for internal links (offline mode).
    • Run npm run markdown-link-check -- -q to only log errors.
    • Run npm run markdown-link-check -- -f /path/your-file.md to run checks for only one file.

For these scripts, you need to have Vale installed (see Requirements):

  • npm run spell:error to show only errors (same as in CI)
  • npm run spell:warn to show errors as well as warnings
  • npm run spell:all to show errors, warnings and suggestions

โ„น๏ธ We are using a custom hook path for enabling pre-commit hooks. This path is set in the local git configuration when running npm install.

Linting and code formatting

How we keep our app's codebase looking consistent and nice ๐Ÿ’…๐Ÿผ

Fine-grained scripts for linting and formatting

We provide npm run lint as well as npm run reformat to check or mutate your changes. We also offer more specific scripts you can use:

Scripts with lint do not mutate your code in any way:

  • npm run lint:code - runs a Prettier and ESlint check. This includes basic checks for markdown, but not in depth.
  • npm run lint:markdown - runs markdown-lint with more detailed check on markdown files.

To apply findings from lint and mutate your files:

  • npm run reformat:code - runs Prettier and ESlint in fix mode.
  • npm run reformat:markdown - runs markdownlint in fix mode.

โ„น๏ธ It's convenient to let Prettier and ESlint automatically format your code "on save" by your IDE or editor. For markdownlint you can find plugins for some IDE/editors, too.

klaw-docs's People

Contributors

muralibasani avatar aindriu-aiven avatar programmiri avatar lornajane avatar harshini-rangaswamy avatar vtainio avatar blomqma avatar angelinekwan avatar ftisiot avatar niklas-lumio-aiven avatar devrishi-dutta avatar basavarajakj avatar jlprat avatar rawshansharma avatar csengineer1990 avatar smulis avatar nctbao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.