You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/14 15:14:31 UTC
[camel-k-runtime] branch release-1.10.x updated: Update javascript.adoc (#759)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
The following commit(s) were added to refs/heads/release-1.10.x by this push:
new cd0d53d Update javascript.adoc (#759)
cd0d53d is described below
commit cd0d53d6090596fbe6c8bcb45050d09829be4c59
Author: Hugo Guerrero <10...@users.noreply.github.com>
AuthorDate: Tue Dec 14 10:14:27 2021 -0500
Update javascript.adoc (#759)
Processor declaration is not required anymore
---
docs/modules/languages/pages/javascript.adoc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/modules/languages/pages/javascript.adoc b/docs/modules/languages/pages/javascript.adoc
index 597825f..e94f33e 100644
--- a/docs/modules/languages/pages/javascript.adoc
+++ b/docs/modules/languages/pages/javascript.adoc
@@ -10,14 +10,12 @@ An integration written in JavaScript looks very similar to a Java one:
[source,js]
.hello.js
----
-const Processor = Java.extend(Java.type("org.apache.camel.Processor"));
-
function proc(e) {
e.getIn().setBody('Hello Camel K!')
}
from('timer:tick')
- .process(new Processor(proc))
+ .process(proc)
.to('log:info')
----