Neuron is a language that compiles directly into HTML, CSS, and JavaScript. Neuron is currently under heavy development.
image {
tag: img;
src: path/to/image;
fill: [math.abs => -10] 0 0 0;
log(this.fill);
}
invoke(image);
<style>
#image {
background-color: rgba(0, 0, 0, 0);
}
</style>
<img id = "image" src = "path/to/image"/>
<script>
image = document.getElementById("image");
image.style.backgroundColor = `rgba(${Math.abs(-10)}, 0, 0, 0)`;
console.log(image.style.backgroundColor);
</script>
Install Neuron with npm
:
npm install -g neuron-lang
Use Neuron in the browser through its web framework:
<script src = "https://github.com/underpig1/neuron-lang/blob/master/lib/browser/browser.mjs" type = "module"></script>
- Object-oriented programming
- Concise and forgiving syntax
- Features the long-awaited unity of HTML, CSS, and JavaScript
- Support in most browsers without third-party software
- Comprehensive standard library
Packages with JavaScript bindings are written in the JSON format. See lib/packages/reference.json
for an example.
To help extensify Neuron's standard library, submit a Pull Request with the appended package in the lib/packages
folder.