Last active
August 29, 2015 14:05
-
-
Save chochos/9dc8227e6cc4893f5654 to your computer and use it in GitHub Desktop.
Example of entry point to use ceylon-js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>simple ceylon-jsjs test</title> | |
<script type="text/javascript" src="../ceylon-web-ide-backend/src/main/webapp/scripts/require.js" data-main="simple.js"></script> | |
</head> | |
<body> | |
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require.config({ | |
baseUrl: "build", | |
waitSeconds: 5, | |
paths:{ | |
'ceylon/language':'runtime/ceylon/language', | |
'check':'test/proto/check' | |
} | |
}); | |
require(["ceylon/language/1.1.0/ceylon.language-1.1.0", 'check/0.1/check-0.1'], function(cl, check) { | |
cl.print(cl.$_String("testing",4)); | |
check.check(false, cl.$_String("it runs!",6)); | |
cl.getProcess().write("probando 1 "); | |
cl.getProcess().write("probando 2 "); | |
cl.getProcess().writeLine("Probando 3"); | |
cl.getProcess().writeLine("Probando 4"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You don't always have to load the language module; only the modules you directly use in the code for your entry point. For example this works: