Git Product home page Git Product logo

cpprunner's Introduction

cpprunner

This is a Node.js project that compiles and runs C/C++ code. It takes the name of the C/C++ file as input, compiles and runs it on changes. The project also includes some extra options, such as -h for help and -st for saving temporary files.

Getting Started


To use this project, you must have Node.js and a C/C++ compiler installed on your system.

Using npx


npx cpprunner <filename>

Using as npm package in a project


Install as npm package

npm i cpprunner

Usage:

import run from "cpprunner";

const filepath = "path/to/your/file"; // without the extension
const extension = "c";

run(filepath, extension);

With Git


  1. Clone the repository to your local machine using git clone https://github.com/mind0bender/cpprunner.git.
  2. Navigate to the project directory using cd cpprunner.
  3. Install the required dependencies using yarn.

Usage:

The cpprunner takes the following options:

To compile and run a C/C++ file, navigate to the project directory and run the following command:

yarn start <filename>

Options

optional arguments:
        -st : save temp files
        -h  : help

Make sure to replace <filename> with the name of your program file.

cpprunner's People

Contributors

mind0bender avatar

Watchers

 avatar

cpprunner's Issues

check if gcc/g++ installated

Currently the package does not include a check for gcc/c++ installed
so even if g++ is not installed and user uses the package it does not throws an error.
we need to check if gcc/g++ is installed and if it isn't then throw an error asking the user to install gcc/g++

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.