1.1.0 • Published 3 years ago

compileon v1.1.0

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

compileon

GitHub license GitHub issues npm version

Makes building online compilers easy.

compileon is a library written in node that helps you build online compilers and editors with ease.

Install

The package can be installed with node.js npm package manager. If you don't have node.js installed you can download it here

$ npm install -g compileon

Note: The -g flag might require sudo permisson.

Usage

First install the compilers required. 1. For Java, install the JAVA SDK .

    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.javaCompile( envData , code , function(data){
        res.send(data);
    });    

Note: As compiling is same for Java in either of the OS can select either of the OS while using it.

    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.compileWithInput( envData , code , input ,  function(data){
        res.send(data);
    });
  1. For python, install python.
    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.executePython( envData , code , function(data){
        res.send(data);
    });    

Note: As compiling is same for Python in either of the OS can select either of the OS while using it.

    //if windows  
    var envData = { OS : "windows"}; 
    //else
    var envData = { OS : "linux" };
    compiler.executeWithInput( envData , code , input ,  function(data){
        res.send(data);
    });
  1. For CPP and C, install g++ or gcc .
    //if windows 
    var envData = { OS : "windows", cmd: "gcc" or "g++"}; 
    //else
    var envData = { OS : "linux", cmd: "gcc" or "g++"};
    compiler.cppCompile( envData , code , function(data){
        res.send(data);
    });    

Note: Can choose either gcc or g++.

    //if windows  
    var envData = { OS : "windows", cmd: "gcc" or "g++"}; 
    //else
    var envData = { OS : "linux", cmd: "gcc" or "g++"};
    compiler.cppcompileWithInput( envData , code , input ,  function(data){
        res.send(data);
    });

Further Updates

  1. Have to add compilers for other languages - Golang.
  2. Have to add Example.

Contributing

  • Fork it and then do the changes or else download the zip file, test to make sure nothing is going sideways.
  • Make a pull request with a detailed explanation.

License

MIT

1.1.0

3 years ago

0.9.7

3 years ago

1.0.0

3 years ago

0.9.5

3 years ago

0.9.0

3 years ago

0.8.9

3 years ago

0.8.8

3 years ago

0.8.5

3 years ago

0.7.5

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.7

3 years ago

0.6.8

3 years ago

0.6.6

3 years ago

0.6.5

3 years ago

0.5.5

3 years ago

0.5.0

3 years ago

0.6.0

3 years ago

0.2.5

3 years ago

0.2.0

3 years ago

0.1.5

3 years ago

0.1.0

3 years ago