todomvc: compile Syndicate DSL ahead of time

This commit is contained in:
Tony Garnock-Jones 2016-05-17 13:27:54 -04:00
parent e27e028d8c
commit acca81076a
3 changed files with 10 additions and 3 deletions

1
js/examples/todo/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.expanded.js

View File

@ -0,0 +1,7 @@
all: index.expanded.js
%.expanded.js: %.js
../../bin/syndicatec $< > $@ || (rm -f $@; false)
clean:
rm -f *.expanded.js

View File

@ -9,9 +9,7 @@
<link rel="stylesheet" href="css/app.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.min.js"></script>
<script src="../../dist/syndicatecompiler.js"></script>
<script src="../../dist/syndicate.js"></script>
<script type="text/syndicate-js" src="index.js"></script>
<script src="../../dist/syndicate.min.js"></script>
</head>
<body>
<section class="todoapp">
@ -60,5 +58,6 @@
<p>Created by <a href="http://twitter.com/leastfixedpoint">Tony Garnock-Jones</a> and <a href="https://twitter.com/tacticalfowl">Sam Caldwell</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="index.expanded.js"></script>
</body>
</html>