Skip to content

Neuron is a language that compiles directly into HTML, CSS, and JavaScript.

License

Notifications You must be signed in to change notification settings

underpig1/neuron-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neuron

Build Status neuron-lang npm version Documentation Status

Neuron is a language that compiles directly into HTML, CSS, and JavaScript. Neuron is currently under heavy development.

Neuron Language:

image {
 tag: img;
 src: path/to/image;
 fill: [math.abs => -10] 0 0 0;
 log(this.fill);
}

invoke(image);

Comparative JavaScript (and HTML):

<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>

Installation

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>

Features

  • 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

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.