Skip to content

Instantly share code, notes, and snippets.

@fogus
Created August 5, 2011 16:17
Show Gist options
  • Select an option

  • Save fogus/1127895 to your computer and use it in GitHub Desktop.

Select an option

Save fogus/1127895 to your computer and use it in GitHub Desktop.
using an external lib in clojurescript
# from your project directory
cljsc src {:optimizations :advanced} > hello.js
open hello.html
function foo() {
alert('you called foo!');
};
;; located in <project>/src/hello/core.cljs
(ns hello.core)
(js/foo)
<html>
<head>
<title>Hello ClojureScript</title>
</head>
<body>
<h1>Hello ClojureScript!</h1>
<script type="text/javascript" src="foo.js"></script>
<script type="text/javascript" src="hello.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment