Skip to content

The idea of the project is to create a node package to manage your code for Codewars' katas and potentially integrate it with some IDEs.

Notifications You must be signed in to change notification settings

JoncoLab/codewars

Repository files navigation

Jonco Lab logo

JoncoLab/codewars
Buy Me A Coffee node

The idea of the project is to create a node package to manage your code for Codewars' katas and potentially integrate it with some IDEs.

This package is at an early development state.

Installation

For now cloning this repo is the only way to use/contribute:

Use gh package:

gh repo clone joncolab/codewars

Or git:

git clone https://github.com/JoncoLab/codewars

After cloning the repo you will need to install dependencies. This project uses Yarn as a package manager

cd /path/to/repo
yarn

After publishing first release the package installation will be available via npm and GitHub Packages

Usage

Available scripts

  • yarn start <kata name> <options>

    Runs main script.

    Actually executes:

    yarn ts-node ./
    
  • yarn lint

    Manually run a linter for project files. Uses ESLint

    Actually executes:

    yarn eslint '{*/**/,/}*.@(js|ts)' --fix
    
  • yarn format

    Format project files to support consistent code styling. Uses Prettier.

    Actually executes:

    yarn prettier --write \"@(*/**/*.@(js|ts)|*.@(js|ts))\"
    
  • yarn dev <kata name> <options>

    Development mode. Starts a nodemon proccess listening for changes in all project files and runs main script.

    Actually executes:

    yarn lint && yarn format && nodemon --
    

Arguments and options

  • <kata name>

    Pass kata name as a first argument for script to run it automatically.

    If you don't pass any name, you will be asked to select a kata you want to run from the list of your katas

  • <options>

    • --kataName - the same as passing a kata name as an argument
    • [WIP] --test - run Jest tests instead of kata code itself

Folder structure

/
├── katas
│   ├──// your kata files
│   └──// examples
├── scripts
│   └──// package scripts
├── test
│   └──// auto tests for your katas
├── .eslintrc.yml // Eslint config
├── .prettierrc.yml // Prettier config
├── index.d.ts // package types declaration files
├── index.ts // main script
├── nodemon.json // Nodemon config
├── package.json // package config
└── tsconfig.json // TypeScript config

About

The idea of the project is to create a node package to manage your code for Codewars' katas and potentially integrate it with some IDEs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published