Code Monkey home page Code Monkey logo

generator-ygcodewars's Introduction

generator-ygcodewars

An extremely simplistic Yeoman generator for scaffolding Codewars kata solutions.

Installation

First, install Yeoman and generator-ygcodewars using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-ygcodewars

If you wish to build and install the project manually, simply run the following commands:

npm install
npm link

Running

Use the following command to run the generator

yo ygcodewars

The generator will first ask for a kata slug or ID, and then query the Codewars API with the given value. If a kata with that slug or ID does exists and it supports Javascript, a hollow file for both the source and test of the solution will be created under the src/ and test/ folders respectively (using the templates at generators/app/templates/solution.js and generators/app/templates/test.js).

Once the files are generated, it's up to you to implement the solution and its tests. See ygunayer/codewars-example for an example project structure, and feel free to fork the repo and build your own work over it.

## What's Missing Since the project is written quite hastily it lacks tests and has suboptimal code quality, so I kept the feature set as limited as possible to prevent any unexpected behavior. Also, it is implied (but not verified) that when running the generator, the directory you're working under is in fact the root folder of a Node.js project that has mocha and chai among its dependencies, and that mocha is also installed globally (even though it's not technically necessary).

To summarize, we need to:

  • Implement tests
  • Improve code quality
  • Verify the current working folder (or quite possibly, scaffold the project when required)

License

MIT

generator-ygcodewars's People

Contributors

ygunayer avatar

Stargazers

 avatar

Watchers

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