Skip to content

Commit

Permalink
DN-34: update to map.apps 4.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Bröker committed Jun 13, 2024
1 parent 8cb6664 commit 3291558
Show file tree
Hide file tree
Showing 20 changed files with 155 additions and 109 deletions.
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "eslint-config-ct-prodeng",
"plugins": [
"vue"
]
"extends": "eslint-config-ct-prodeng",
"plugins": [
"vue"
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
/.vscode/settings.json
/.externalToolBuilders/
/package-lock.json
/gulpfile.overrides.js
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ https://demos.conterra.de/mapapps/resources/apps/downloads_popupstypes/index.htm

[dn_popupstypes Documentation](https://github.com/conterra/mapapps-popups-types/tree/master/src/main/js/bundles/dn_popupstypes)

## Development Guide
### Define the mapapps remote base
Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file:
`<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>`

### Other methods to to define the mapapps.remote.base property.
1. Goal parameters
`mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%`

2. Build properties
Change the mapapps.remote.base in the build.properties file and run:
`mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties`
## Quick start

Clone this project and ensure that you have all required dependencies installed correctly (see [Documentation](https://docs.conterra.de/en/mapapps/latest/developersguide/getting-started/set-up-development-environment.html)).

Then run the following commands from the project root directory to start a local development server:

```bash
# install all required node modules
$ mvn initialize

# start dev server
$ mvn compile -Denv=dev -Pinclude-mapapps-deps

# run unit tests
$ mvn test -P run-js-tests,include-mapapps-deps
```
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
✅ Tested for map.apps 4.13.1 / Linie 4
✅ Tested for map.apps 4.18.1 / Linie 4

#### Release Notes
- SNAPSHOT-Release
- autogenerated SNAPSHOT-Release
7 changes: 2 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ mapapps.registerTasks({
},

/* a list of themes inside this project */
themes: [/*"sample-theme"*/],
themes: [],
/* state that the custom theme will be dependant from map.apps everlasting theme that provides the base styles */
hasBaseThemes: true,
/* state that we want to support vuetify components and therefore need the vuetify core styles*/
hasVuetify: true,
themeChangeTargets: {
"vuetify": [
// "sample_theme"
]
"vuetify": []
},
/* A list oft target browser versions. This should be streamlined with Esri JS API requirements. */
transpileTargets: {
Expand Down Expand Up @@ -139,7 +137,6 @@ gulp.task("lint",
gulp.task("preview",
gulp.series(
"build",
"lint",
gulp.parallel(
"watch",
"browser-sync"
Expand Down
41 changes: 26 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,33 @@
"version": "0.0.1",
"license": "CC0-1.0",
"scripts": {
"check-licenses": "node ./src/support/js/check-licenses.js"
"check-licenses": "tsx ./src/support/js/check-licenses.ts",
"check-types": "tsc --noEmit",
"watch-types": "tsc -w --noEmit"
},
"devDependencies": {
"@conterra/ct-mapapps-typings": "4.15.1",
"@conterra/mapapps-mocha-runner": "^1.1.1",
"@types/arcgis-js-api": "4.26.0",
"chai": "^4.3.7",
"ct-mapapps-browser-sync": "0.0.30",
"ct-mapapps-gulp-js": "0.9.4",
"eslint-config-ct-prodeng": "1.3.0-next-2",
"license-checker": "^25.0.1",
"mocha": "^10.2.0",
"puppeteer": "^19.11.1",
"vue-template-compiler": "2.7.8",
"stylelint-config-ct-prodeng": "1.0.4",
"stylelint-config-recommended": "5.0.0",
"stylelint": "^13.13.1"
"@conterra/ct-mapapps-typings": "~4.18.1",
"@conterra/mapapps-mocha-runner": "1.1.1",
"@conterra/reactivity-core": "^0.4.0",
"@types/chai": "4.3.10",
"@types/license-checker": "^25.0.6",
"@types/mocha": "10.0.4",
"arcgis-js-api": "4.29.10",
"chai": "4.3.10",
"ct-mapapps-browser-sync": "0.0.39",
"ct-mapapps-gulp-js": "0.10.3",
"eslint-config-ct-prodeng": "1.4.0",
"license-checker": "25.0.1",
"mocha": "10.2.0",
"puppeteer": "21.5.2",
"stylelint": "15.11.0",
"stylelint-config-ct-prodeng": "2.0.0",
"stylelint-config-recommended": "13.0.0",
"stylelint-config-recommended-less": "2.0.0",
"ts-node": "^10.9.1",
"tsx": "^4.6.0",
"typescript": "5.4.5",
"vue": "2.7.15",
"vue-template-compiler": "2.7.15"
}
}
92 changes: 63 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.conterra.devnet</groupId>
Expand Down Expand Up @@ -46,11 +47,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>de.conterra.mapapps</groupId>
<artifactId>ct-mapapps-js</artifactId>
<version>${mapapps.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -81,16 +77,24 @@
<version>${ct.jsrt-test.version}</version>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>de.conterra.mapapps</groupId>
<artifactId>mapapps-maven-plugin</artifactId>
<version>${mapapps.version}</version>
</plugin>
<plugin>
<groupId>de.conterra.jsregistry</groupId>
<artifactId>ct-jsregistry-maven-plugin</artifactId>
<version>${ct.jsregistry.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -138,10 +142,9 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.1</version>
<version>1.14.2</version>
<configuration>
<nodeVersion>v18.13.0</nodeVersion>
<npmVersion>8.19.3</npmVersion>
<nodeVersion>v20.9.0</nodeVersion>
</configuration>
</plugin>
<plugin>
Expand All @@ -167,11 +170,6 @@
<artifactId>setproperties-maven-plugin</artifactId>
<version>1.0.2</version>
</plugin>
<plugin>
<groupId>de.conterra.jsrt</groupId>
<artifactId>ct-jsrt-test-maven-plugin</artifactId>
<version>${ct.jsrt-test.version}</version>
</plugin>
</plugins>
</pluginManagement>
<sourceDirectory>src/main/js</sourceDirectory>
Expand All @@ -197,6 +195,29 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.8.0,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[17,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.conterra.maven</groupId>
<artifactId>setproperties-maven-plugin</artifactId>
Expand All @@ -209,32 +230,31 @@
</execution>
</executions>
<configuration>
<!-- add here properties which are used in plugin configuration resolution -->
<properties>
<!-- deployment of map.apps installation -->
<mapapps.remote.base>.</mapapps.remote.base>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.11.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<version>3.5.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>unpack-themes-src</id>
Expand Down Expand Up @@ -337,6 +357,9 @@
<include>**/gulpfile.js</include>
<include>**/pom.xml</include>
</includes>
<excludes>
<exclude>src/main/js/**/*.min.js</exclude>
</excludes>
<mapping>
<vue>XML_STYLE</vue>
</mapping>
Expand Down Expand Up @@ -403,6 +426,13 @@
<plugin>
<groupId>de.conterra.mapapps</groupId>
<artifactId>mapapps-maven-plugin</artifactId>
<configuration>
<!-- only build zip files -->
<skipDeploy>true</skipDeploy>
<createApp>false</createApp>
<sourceDirectory>${js.build.outputPath}/apps</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
<executions>
<execution>
<!-- used to create .zip files containing the apps during the build -->
Expand Down Expand Up @@ -430,13 +460,6 @@
</configuration>
</execution>
</executions>
<configuration>
<!-- only build zip files -->
<skipDeploy>true</skipDeploy>
<createApp>false</createApp>
<sourceDirectory>${js.build.outputPath}/apps</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down Expand Up @@ -490,11 +513,12 @@
<root.build.outputPath>${project.build.directory}/webapp</root.build.outputPath>
<js.build.outputPath>${root.build.outputPath}/js</js.build.outputPath>

<mapapps.version>4.15.1</mapapps.version>
<mapapps.version>4.18.1</mapapps.version>
<vuetify.version>1.5.30</vuetify.version>
<!-- JS lib versions -->
<apprt.version>${mapapps.version}</apprt.version>
<!-- java lib versions -->
<ct.jsregistry.version>1.5.10</ct.jsregistry.version>
<ct.jsregistry.version>2.1.1</ct.jsregistry.version>
<ct.jsrt-test.version>2.0.2</ct.jsrt-test.version>

<!-- the default app, replaced in the *.html files to switch app names-->
Expand Down Expand Up @@ -524,7 +548,7 @@
required -->
<mapapps.useChunkedRequestEncoding>true</mapapps.useChunkedRequestEncoding>
<!-- enable this if "upload" profile should only deploy bundles -->
<skip.apps.upload>true</skip.apps.upload>
<skip.apps.upload>false</skip.apps.upload>
<!-- enable this if "upload" profile should pre-optimize apps -->
<triggerPreOptimization>false</triggerPreOptimization>
</properties>
Expand Down Expand Up @@ -557,6 +581,11 @@
<artifactId>ags-js-api4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.esri</groupId>
<artifactId>terraformer-js</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>moment-js</groupId>
<artifactId>moment-js</artifactId>
Expand All @@ -567,6 +596,11 @@
<artifactId>apprt-polyfill</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.conterra.js</groupId>
<artifactId>reactivity</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
Expand Down
16 changes: 0 additions & 16 deletions src/main/js/apps/sample/app.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/js/apps/sample/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
"locateme",
"dn_popupstypes"
],
"require": [
"${app}.app"
],
"i18n": [
"bundle"
]
Expand Down
4 changes: 2 additions & 2 deletions src/main/js/bundles/dn_popupstypes/PopupDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
export default function PopupDefinition(template) {
return {
resolvePopupTemplate(layerOrSublayer) {
resolvePopupTemplate() {
return template;
},

resolvePopupTemplateForStore(store) {
resolvePopupTemplateForStore() {
return template;
}
};
Expand Down
1 change: 1 addition & 0 deletions src/main/types/mocha-global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const testConfig: (opts?: Record<string, any>) => void;
Loading

0 comments on commit 3291558

Please sign in to comment.