Skip to content

Instantly share code, notes, and snippets.

@muyueh
Last active August 29, 2015 14:18
Show Gist options
  • Save muyueh/652b55ee91093a65b07f to your computer and use it in GitHub Desktop.
Save muyueh/652b55ee91093a65b07f to your computer and use it in GitHub Desktop.
example of livescript setting
.DS_Store
gulpfile.ls

This is a setup for using livescript in gist. Since gist doesnt' take file structure, everything must be flat.

<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- including from header - start -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script>
<script type="text/javascript" src="//muyueh.com/30/lib/js/prelude-browser-min.js"></script>
<script type="text/javascript" src="//muyueh.com/30/lib/js/jquery.min.js"></script>
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-36523378-1', 'auto');
ga('send', 'pageview');
</script>
<!-- including from header - end -->
</head>
<body>this is some test
<script type="text/javascript" src="./index.js"></script>
</body>
</html>
doctype html
html
head
title
include ../j_piece/header
//- link(href="./index.css", rel="stylesheet")
body
| this is some test
script(type="text/javascript", src="./index.js")
var _;
_ = require("prelude-ls");
d3.selectAll("body").text("hi");
_ = require "prelude-ls"
d3.selectAll "body"
.text "hi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment