Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

A modifiable and expandable compiler written in JavaScript

Notifications You must be signed in to change notification settings

EnderCommunity/EnderCompiler

Repository files navigation

EnderCompiler

A modifiable compiler written in JS

How to run it

Node run.js --from="<string>" --to="<string>" --input="<path>" --output="<path>"

Make sure to run npm install first, or you could just run the first.bat file. You need NodeJS to run EnderCompiler.

--from="<string>" - the language that you want to compile
--to="<string>" - the language that you want your output to be in
--input="<path>" - the path of the input folder
--output="<path>" - the path of the output folder
--emptyOutputDir - empties the output directory before compiling
--emptyInputDir - empties the input directory after compiling

EnderHTML

This is a language that only adds the <component> element to HTML! This language is useful when building websites that have repetitive elements in them. (e.g. footers or navigation bars)

Node run.js --from="EnderHTML" --to="HTML" --input="<path>" --output="<path>" --emptyOutputDir --components="<path>"

--components="<path>" - The directory of the file that contains instructions on your own custom components The file should follow this format:

module.exports = {
    <name>: function(atributes) {
        //Do some stuff
        return "you final HTML code";
    },
    [...]
};

And the <component> element should follow this format:

<component:name [atributes]/>
<!-- Like: <component:nav selected="2"/> -->

You can test the compiler by running test.bat. It will compile the files in ./test, and save the output in ./test_output.

About

A modifiable and expandable compiler written in JavaScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published