summaryrefslogtreecommitdiffstats
path: root/documentation/clientside/clientside-compiling.asciidoc
diff options
context:
space:
mode:
authorMarkus Koivisto <markus@vaadin.com>2016-01-22 14:55:18 +0200
committerMarkus Koivisto <markus@vaadin.com>2016-01-22 14:55:18 +0200
commit99d6de546c74f0eed230ea8253dda6b85109d2e7 (patch)
tree10fc21c557566fe3241e6e13499df18d80f8dcb2 /documentation/clientside/clientside-compiling.asciidoc
parent610736d9f373d4b37fd39ff8f90aabd13eab7926 (diff)
downloadvaadin-framework-99d6de546c74f0eed230ea8253dda6b85109d2e7.tar.gz
vaadin-framework-99d6de546c74f0eed230ea8253dda6b85109d2e7.zip
Add documentation to master branch
Change-Id: I2504bb10f1ae73ec0cbc08b7ba5a88925caa1674
Diffstat (limited to 'documentation/clientside/clientside-compiling.asciidoc')
-rw-r--r--documentation/clientside/clientside-compiling.asciidoc81
1 files changed, 81 insertions, 0 deletions
diff --git a/documentation/clientside/clientside-compiling.asciidoc b/documentation/clientside/clientside-compiling.asciidoc
new file mode 100644
index 0000000000..18afb2c6ac
--- /dev/null
+++ b/documentation/clientside/clientside-compiling.asciidoc
@@ -0,0 +1,81 @@
+---
+title: Compiling a Client-Side Module
+order: 4
+layout: page
+---
+
+[[clientside.compiling]]
+= Compiling a Client-Side Module
+
+A client-side module, either a widget set or a pure client-side module, needs to
+be compiled to JavaScript using the Vaadin Client Compiler. During development,
+the Development Mode makes the compilation automatically when you reload the
+page, provided that the module has been initially compiled once with the
+compiler.
+
+As most Vaadin add-ons include widgets, widget set compilation is usually needed
+when using add-ons. In that case, the widget sets from different add-ons are
+compiled into a __project widget set__, as described in
+<<dummy/../../../framework/addons/addons-overview.asciidoc#addons.overview,"Using
+Vaadin
+Add-ons">>.////
+TODO Provide a link to a proper add-on compilation section when one is
+available.
+////
+
+[[clientside.compiling.overview]]
+== Vaadin Compiler Overview
+
+The Vaadin Client Compiler compiles Java to JavaScript. It is provided as the
+[filename]#vaadin-client-compiler# JAR, which you can execute with the
+[literal]#++-jar++# parameter for the Java runtime. It requires the
+[filename]#vaadin-client# JAR, which contains the Vaadin client-side framework.
+
+The compiler compiles a __client module__, which can be either a pure
+client-side module or a Vaadin widget set, that is, the Vaadin Client-Side
+Engine that includes the widgets used in the application. The client module is
+defined with a module descriptor, which was described in
+<<dummy/../../../framework/clientside/clientside-module#clientside.module,"Client-Side
+Module Descriptor">>.
+
+The compiler writes the compilation result to a target folder that will include
+the compiled JavaScript with any static resources included in the module.
+
+
+[[clientside.compiling.eclipse]]
+== Compiling in Eclipse
+
+When the Vaadin Plugin is installed in Eclipse, you can simply click the
+[guibutton]#Compile Vaadin widgets# button in the toolbar. It will compile the
+widget set it finds from the project. If the project has multiple widget sets,
+such as one for custom widgets and another one for the project, you need to
+select the module descriptor of the widget set to compile before clicking the
+button.
+
+The compilation with Vaadin Plugin for Eclipse currently requires that the
+module descriptor has suffix [filename]#Widgetset.gwt.xml#, although you can use
+it to compile also other client-side modules than widget sets. The result is
+written under [filename]#WebContent/VAADIN/widgetsets# folder.
+
+
+[[clientside.compiling.ant]]
+== Compiling with Ant
+
+You can find a script template for compiling widget sets with Ant and Ivy at the
+link:http://vaadin.com/download/[Vaadin download page]. You can copy the build
+script to your project and, once configured, run it with Ant.
+
+
+[[clientside.compiling.maven]]
+== Compiling with Maven
+
+You can compile the widget set with the [literal]#++vaadin:compile++# goal as
+follows:
+
+[subs="normal"]
+----
+[prompt]#$# [command]#mvn# [parameter]#vaadin:compile#
+----
+
+
+