GithubHelp home page GithubHelp logo

fizz-buzz-class-kata's Introduction

TypeScript Kata Template

To install dependencies

yarn

To run all tests

yarn test

To run all tests each time you save a change

yarn test --watchAll

To type-check and lint (in vscode)

ctrl-shift-b (or on mac, cmd-shift-b)

Debug in vscode

Call the function you want to debug from src/main.ts

Add a breakpoint in your function by clicking to the left of the relevant line number.

Open the "run and debug" panel

From the top choose "Debug main.ts"

That's it, the debugger should launch and pause when your first breakpoint is encountered.

This will compile your code before running, and will show you the typescript source even though in reality the debugger is stepping through the relevant compiled javascript. It is able to do this because tsconfig specifies sourceMap: true and an ourDir location.

If you're curious you can see the specific details in ./vscode/launch.json

To compile for codewars

Some codewars katas support typescript. Others only support JS submissions.

Here's how to compile one stand-alone .ts file into .js for the latter type of kata.

You will first need to alter make-js-for-one in package.json to refer to the file you want compiled.

then:

yarn make-js-for-one

your output .js will be generated into a new folder generatedJS.

โš ๏ธ Delete this folder when you're done to avoid confusion!

alternatively, use tsc directly

You don't need to use the make-js-for-one convenience command. Instead:

yarn tsc src/myGreatFile.ts --outDir generatedJS

but you might get tired of typing that!

license

Creative Commons License

This is part of Academy's technical curriculum for The Mark. All parts of that curriculum, including this project, are licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License

fizz-buzz-class-kata's People

Contributors

cynthiacodes avatar

Watchers

 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.