-
-
Save ledsun/4671618 to your computer and use it in GitHub Desktop.
antからJavaScriptを呼び出すときの例
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project default="a"> | |
<target name="a"> | |
<script language="javascript"><![CDATA[ | |
print('hello world!'); | |
]]></script> | |
</target> | |
</project> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project default="a"> | |
<target name="a"> | |
<script language="javascript"><![CDATA[ | |
throw 'わあ!'; | |
]]></script> | |
</target> | |
</project> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<project default="a"> | |
<target name="a"> | |
<script language="javascript"><![CDATA[ | |
try{ | |
throw ''; | |
}catch(e){ | |
project.setProperty('fail', ''); | |
} | |
]]></script> | |
<fail if="fail" message="JavaScriptでエラーが起きた" /> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment