Code Monkey home page Code Monkey logo

advent-of-code-typescript's Introduction

Advent of Code 2022 - TypeScript

How it works:

Clone this repo with the command:

git clone https://github.com/ZackDeRose/advent-of-code-starter.git

For each puzzle of the advent of code, this starter gives you:

  • a .ts file for your solution (in src/day-X)
  • a .spec.ts file for testing (also in src/day-X)
  • a <a/b>.test.txt file for your test data-set (in data/day-X)
  • a <a/b>.txt file for you to paste your full dataset (also in data/day-X).

The starting point we've generated will allow you to use the commands provided to pass the appropriate data set when running/testing your solution.

Running Commands

Given you're on the first puzzle of day 1, here are the commands available:

Run Your Code

npx nx day-1-a

This will run your code in a node context against the full data set provided in data/day-1/a.txt

  • the --watch option can be added to add file watching (i.e.: npx nx day-1-a --watch)
  • the --test-data option can be added to run against your test data set found in the provided data/day-1/a-test.txt (i.e.: npx nx day-1-a --test-data);
  • these options can be combined (i.e.: npx nx day-1-a --test-data --watch)

Run Tests

npx nx test-day-1-a

This will run the test you can find in src/day-1/a.spec.ts.

The generated code in this file will already import and run your solution from src/day-1/a.ts against the data found in data/day-1/a-test.txt, but you are welcome to adjust this test code as needed.

  • the --watch option can be used to turn on file-watching for your test.

This workspace has been generated by Nx, a Smart, fast and extensible build system.

Further help

Visit the Nx Documentation to learn more.

advent-of-code-typescript's People

Contributors

zackderose avatar dantekelly 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.