Skip to content

Commit

Permalink
introducing scriptloader & interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermg committed Apr 4, 2015
1 parent 50f7b3c commit 9b47fdf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/meteor-skeleton.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<title>Meteor Bootstrap skeleton</title>

<script type="text/javascript" src="/js/theclient.js"></script>
<script type="text/javascript" src="/js/scriptloader.js"></script>

</head>

Expand Down
5 changes: 5 additions & 0 deletions public/js/interpreter.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

console.log 'interpreter run!'

123

12 changes: 12 additions & 0 deletions public/js/scriptloader.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

class Scriptloader
constructor: (interpreter, scripts) =>
$.ajax {
url: "/js/#{interpreter}",
dataType: 'text',
success: (data) ->
console.log "success: #{data}"
error: (xhr, stuff, error) ->
console.log "ERROR loading interpreter: #{error}"
}

0 comments on commit 9b47fdf

Please sign in to comment.