|
1 | | -# gwt-site-webapp |
2 | | -This project includes the client code of the GWT site. It does not include the |
3 | | -site content which is in the gwt-site project nor the utilities to create and |
4 | | -deploy with samples and plugin releases. |
| 1 | +# GWT Documentation |
5 | 2 |
|
6 | | -## Requirements |
7 | | -[Apache Maven](http://maven.apache.org) 3.8 or greater, and JDK 11+ in order to run. |
| 3 | +* GWT documentation is published under https://www.gwtproject.org/doc/latest/DevGuide.html |
8 | 4 |
|
9 | | -To build the project, invoke the following command: |
| 5 | +## Reference |
10 | 6 |
|
11 | | - $ mvn verify |
| 7 | +* Markdown processor: https://github.com/sirthias/pegdown |
12 | 8 |
|
13 | | -This only tests and builds the JS to enhance the site content. To build the contents |
14 | | -first, you need to build the gwt-site project. |
| 9 | +## Adding content |
15 | 10 |
|
16 | | -1. Check out the [gwt-site](https://github.com/gwtproject/gwt-site) project. |
17 | | -2. Build the gwt-site project: |
| 11 | +* See: https://www.gwtproject.org/makinggwtbetter.html#webpage |
18 | 12 |
|
19 | | - $ cd [...]/gwt-site |
20 | | - $ mvn install |
| 13 | +## Requirements |
| 14 | +[Apache Maven](http://maven.apache.org) 3.8 or greater, and JDK 11+ in order to run. |
21 | 15 |
|
22 | | -3. Build the gwt-site-webapp project, with the -Pfull-site profile: |
| 16 | +## Building |
23 | 17 |
|
24 | | - $ cd [...]/gwt-site-webapp |
25 | | - $ mvn verify -Pfull-site |
| 18 | +If you have Grunt installed : |
| 19 | +* build the assets using Grunt: `grunt` |
| 20 | +* then run: `mvn clean install` |
| 21 | +* after that you will find the generated documentation in `content/target/generated-site/`. |
26 | 22 |
|
27 | | -Now you can point your browser to the `target/www` folder, or you can serve |
28 | | -its content with any web-server (i.e [serve](https://www.npmjs.com/package/serve) or |
29 | | -[http.server](https://docs.python.org/3/library/http.server.html)). |
30 | | -Notice that an http server is needed if you want to test site navigation via Ajax. |
| 23 | +If you don't have Grunt installer : |
| 24 | +* build the assets using Maven and Grunt plugin: `mvn clean install -Pgrunt` |
| 25 | +* after that you will find the generated documentation in `content/target/generated-site/`. |
31 | 26 |
|
32 | | -Building will run the **tests**, but to explicitly run them you can use the test target |
| 27 | +### Running locally |
| 28 | +Run the site locally for easy visual testing |
33 | 29 |
|
34 | | - $ mvn test |
| 30 | +Run without server: |
| 31 | +* Change to the `content/target/generated-site` folder. |
| 32 | +* Open the `index.html` file in your browser. |
35 | 33 |
|
36 | | -# Develop and Deploy |
| 34 | +Run with Maven: |
| 35 | +* Run: `mvn -pl content jetty:run` |
| 36 | +* Open URL `http://localhost:9999` in your browser. |
37 | 37 |
|
38 | | -Note that as configured, sourcemaps will not work locally - they must be deployed to gwtproject.org |
39 | | -because the generated JS will attempt to load them from an absolute URL. |
| 38 | +# gwt-site-webapp |
40 | 39 |
|
41 | | - * The `target/gwt-site-webapp-<version>.war` file (and the `target/gwt-site-webapp-<version>` |
42 | | - directory) contains the generated JavaScript and sourcemaps, and can be deployed along with the |
43 | | - generated site content. |
44 | | - * The `target/www` directory contains the generated JavaScript, sourcemaps (and Java sources), |
45 | | - and the generated HTML from gwt-site itself, and is suitable for deployment directly to a |
46 | | - server. |
0 commit comments