All Projects β†’ blockstarter β†’ lsxc

blockstarter / lsxc

Licence: other
Compile Livescript + Pug + React + SASS as a single component

Programming Languages

livescript
113 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lsxc

Compile Hero
πŸ”°Visual Studio Code Extension For Compiling Language
Stars: ✭ 169 (+894.12%)
Mutual labels:  jsx, pug, jade
Pug As Jsx Loader
Stars: ✭ 168 (+888.24%)
Mutual labels:  jsx, pug, jade
Jade
Jade.go - pug template engine for Go (golang)
Stars: ✭ 251 (+1376.47%)
Mutual labels:  pug, jade
indent.js
Pure code indentation for jsx, tsx, ts, js, html, css, less, scss.
Stars: ✭ 55 (+223.53%)
Mutual labels:  jsx, pug
tale-pug
Tale Pug is the popular JavaScript Template Engine Pug, formerly Jade, for PHP!
Stars: ✭ 32 (+88.24%)
Mutual labels:  pug, jade
Jade Html5 Boilerplate
HTML5 Boilerplate ported to Jade. Great as a drop and go markup skeleton for Express apps.
Stars: ✭ 111 (+552.94%)
Mutual labels:  pug, jade
Laravel Pug
Pug view adapter for Laravel and Lumen
Stars: ✭ 130 (+664.71%)
Mutual labels:  pug, jade
Gulp Pug Sass Seed
🍹 A Pug and Sass starter project using gulp for task automation.
Stars: ✭ 84 (+394.12%)
Mutual labels:  pug, jade
idiots.win
Google Autocomplete Guessing Game
Stars: ✭ 26 (+52.94%)
Mutual labels:  pug, jade
pypugjs
PugJS syntax adapter for Django, Jinja2 and Mako templates
Stars: ✭ 237 (+1294.12%)
Mutual labels:  pug, jade
emitty
A platform for finding dependencies between files and building tools for incremental compilation or build.
Stars: ✭ 69 (+305.88%)
Mutual labels:  pug, jade
Node.js Bootstrap Starter Template
Node.js, Express, Pug, Twitter Bootstrap, Starter Template
Stars: ✭ 107 (+529.41%)
Mutual labels:  pug, jade
Wordless
All the power of Pug, Sass, Coffeescript and WebPack in your WordPress theme. Stop writing themes like it's 1998.
Stars: ✭ 1,374 (+7982.35%)
Mutual labels:  pug, jade
Bootstrap3 Pug Former jade Node Express Grunt
Bootstrap 3 templated by Jade
Stars: ✭ 242 (+1323.53%)
Mutual labels:  pug, jade
Pug Sass Boilerplate Starter Kit
A Front-end template for building web apps or sites using Pug(Jade) and Sass
Stars: ✭ 92 (+441.18%)
Mutual labels:  pug, jade
pug-symfony
Pug (Jade) template engine for Symfony
Stars: ✭ 40 (+135.29%)
Mutual labels:  pug, jade
Ines Io
⚑️ Source of my website and blog (Harp, Jade, Sass, JavaScript)
Stars: ✭ 38 (+123.53%)
Mutual labels:  pug, jade
Expug
Pug templates for Elixir
Stars: ✭ 74 (+335.29%)
Mutual labels:  pug, jade
pretty-harp-jade-skeleton
πŸ’€ Harp & Jade/Pug skeleton theme for a personal blog
Stars: ✭ 15 (-11.76%)
Mutual labels:  pug, jade
bit-css
η”¨εŽŸε­η±»θ΅‹δΊˆε…ƒη΄ ε±žζ€§οΌŒε‡ε°‘η”šθ‡³δΈε†™css
Stars: ✭ 19 (+11.76%)
Mutual labels:  pug, jade

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

Demo

Demo

News

We can pay for improvements when we accept your pull requests
We are hiring - please contract [email protected]
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)

require! {
  \mobx-react : { observer }
  \mobx : { observable }
  \react-dom : { render }
  \react
}

.btn
  color: red
  padding-left: 5px
  &:hover
    color: orange

btn = ({click, text})->
    a.pug.btn(target='blank' on-click=click) #{text} 

input = ({store})->
  handle-enter-click = (event) -> 
    return if event.key-code isnt 13 
    store.todos.push text: event.target.value
    event.target.value = ''
  input.pug(on-key-down=handle-enter-click)  

Main = observer ({store})->
  remove = (todo, _)-->
      index = store.todos.index-of todo
      return if index < 0
      store.todos.splice 1, index
  .pug
    h3.pug Tasks
    for todo in store.todos
      .pug 
        span.pug #{todo.text}
        span.pug
          btn {text: 'Remove', click: remove todo}
    input {store}
    hr.pug 

window.onload = ->
  store = observable do
      todos:
        * text: 'Do dishes'
        ...
  render do
    Main.pug(store=store)
    document.document-element

Compile

lsxc -skhbc file.ls

Help

To see all available options for lsxc run next command:

lsxc --help

Run programmatically

JavaScript

let lsxc = require('lsxc');

let opts = {
    file: "filename",
    target: "resultname",
    bundle: "bundle",
    html: "index"
};

lsxc(opts);

Use a custom HTML template

1. Create a file template.html

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

2. Then compile an app:

lscx -h -t ./template.html
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].