Skip to content

Repository files navigation

LSX Compiler

logo

  • Compile LiveScript + Pug + SASS + React into JavaScript and CSS bundles
  • Describe the styles, logic and layout of your app in one file (component style)
  • Use benefits of indented languages
  • Build React DOM in functional style
  • Use fast compiler

Highlighting Rules ACE, Cloud9 - https://gist.github.com/askucher/4ffe22d43cba7ef727ae8208c525228b

Demo

Demo

News

We can pay for improvements when we accept your pull requests
We are hiring - please contract a.stegno@gmail.com
Join to collaborate https://ide.c9.io/askucher/lsxc

Install

npm i lsxc -g
#next modules we use for demo:
npm i react react-dom mobx mobx-react --save 

Example

Code (file.ls)

Example

Compile

lsxc -skhbc file.ls

Help

To see all available options for lsxc run next command:

lsxc --help

Run programmatically

JavaScript

letlsxc=require('lsxc');letopts={file: "filename",target: "resultname",bundle: "bundle",html: "index"};lsxc(opts);

Use a custom HTML template

1. Create a file template.html

<!DOCTYPE html><htmllang="en-us"><head><metacharset="utf-8"><title>The Perfect App</title><dynamicCSS/></head><body><dynamicHTML/></body></html>

2. Then compile an app:

lscx -h -t ./template.html

About

Compile Livescript + Pug + React + SASS as a single component

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages