A modifiable compiler written in JS
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
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.