JS: add ant tasks for publishing kotlin-test-js to NPM (KT-19682)

This commit is contained in:
Anton Bannykh
2017-10-11 15:02:12 +03:00
parent 7076fda542
commit 2d3929ee58
3 changed files with 68 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# Kotlin Test
Module `kotlin-test` is used by the [Kotlin/JS](https://kotlinlang.org/docs/tutorials/javascript/kotlin-to-javascript/kotlin-to-javascript.html)
compiler output for performing assertions in tests, independently of the test framework being used.
The library includes out-of-the-box support for [Jasmine](https://jasmine.github.io/),
[Mocha](https://mochajs.org/), [Jest](https://facebook.github.io/jest/),
and [QUnit](http://qunitjs.com).
Try out the [examples](https://github.com/JetBrains/kotlin-examples/tree/master/gradle/js-tests),
read the [forum post](https://discuss.kotlinlang.org/t/unit-testing-in-kotlin-js/3943)
and the [library documentation](https://kotlinlang.org/api/latest/kotlin.test/kotlin.test/index.html)
for more information.
## Handy links
* [Kotlin Site](http://kotlinlang.org/)
* [Getting Started Guide](http://kotlinlang.org/docs/tutorials/javascript/getting-started-idea/getting-started-with-intellij-idea.html)
* [Try Kotlin](http://try.kotlinlang.org/)
* [Kotlin Standard Library](http://kotlinlang.org/api/latest/jvm/stdlib/index.html)
* [Issue Tracker](http://youtrack.jetbrains.com/issues/KT)
* [Forum](http://devnet.jetbrains.net/community/kotlin?view=discussions)
* [Kotlin Blog](http://blog.jetbrains.com/kotlin/)
* [Follow Kotlin on Twitter](https://twitter.com/kotlin)
* [Public Slack channel](http://slack.kotlinlang.org/)
* [TeamCity CI build](https://teamcity.jetbrains.com/project.html?tab=projectOverview&projectId=Kotlin)
## Editing Kotlin
* [Kotlin IntelliJ IDEA Plugin](https://kotlinlang.org/docs/tutorials/getting-started.html)
* [Kotlin Eclipse Plugin](http://kotlinlang.org/docs/tutorials/getting-started-eclipse.html)
* [Kotlin TextMate Bundle](https://github.com/vkostyukov/kotlin-sublime-package)
+23
View File
@@ -0,0 +1,23 @@
{
"name": "kotlin-test",
"version": "1.0.0",
"description": "Standard Testing Library for Kotlin Applications",
"main": "kotlin-test.js",
"repository": {
"type": "git",
"url": "git+https://git@github.com/JetBrains/kotlin.git"
},
"keywords": [
"Kotlin",
"Language",
"Testing",
"JavaScript",
"JetBrains"
],
"author": "JetBrains",
"license": "Apache-2.0",
"bugs": {
"url": "kotl.in/issue"
},
"homepage": "kotlinlang.org"
}
+13
View File
@@ -124,11 +124,24 @@
</publish-to-npm>
</target>
<target name="publish-kotlin-test-js-to-npm">
<publish-to-npm template="kotlin-test" version="${kotlin.deploy.version}" tag="${kotlin.deploy.tag}">
<copy file="${js.stdlib.output.dir}/kotlin-test.js" todir="${package_deploy_dir}" failonerror="true" />
<copy file="${js.stdlib.output.dir}/kotlin-test.meta.js" todir="${package_deploy_dir}" failonerror="true" />
</publish-to-npm>
</target>
<!-- Used on TeamCity-->
<target name="unzip-jslib.jar">
<unzip src="${output}/kotlinc/lib/kotlin-stdlib-js.jar" dest="${js.stdlib.output.dir}"/>
</target>
<!-- Used on TeamCity-->
<target name="unzip-test-jslib.jar">
<unzip src="${output}/kotlinc/lib/kotlin-test-js.jar" dest="${js.stdlib.output.dir}"/>
</target>
<target name="run-nodejs-tests" description="Run JS backend tests in node.js" depends="download-nodejs-and-npm">
<npm command="install" dir="js/js.translator/testData" />
<npm command="run" dir="js/js.translator/testData" failonerror="false">