generated from conterra/mapapps-devnet-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from conterra/dev-4.15-search-layers
Dev 4.15 search layers
- Loading branch information
Showing
31 changed files
with
518 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"Vue.volar", | ||
"Esri.arcgis-jsapi-snippets", | ||
"ctjdr.vscode-apprt-bundles" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:9090", | ||
"webRoot": "${workspaceFolder}/src/main" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Copyright (C) 2021 con terra GmbH ([email protected]) | ||
# Copyright (C) 2023 con terra GmbH ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2021 con terra GmbH ([email protected]) | ||
* Copyright (C) 2023 con terra GmbH ([email protected]) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -15,38 +15,161 @@ | |
*/ | ||
const gulp = require("gulp"); | ||
const mapapps = require('ct-mapapps-gulp-js'); | ||
const mapappsBrowserSync = require("ct-mapapps-browser-sync"); | ||
|
||
const isProduction = process.env.NODE_ENV === "production"; | ||
console.info(`Configuring gulp build for ${isProduction ? "production" : "development"}`); | ||
|
||
const localOverrides = (function () { | ||
if (isProduction) { | ||
// Never override defaults in production mode | ||
return undefined; | ||
} | ||
|
||
try { | ||
return require("./gulpfile.overrides"); | ||
} catch (e) { | ||
// File may not exist | ||
return undefined; | ||
} | ||
})(); | ||
|
||
// used to transport test urls in "run-browser-tests-local" task | ||
const runBrowserTests = []; | ||
|
||
mapapps.registerTasks({ | ||
/** Enable debug logging */ | ||
debug: localOverrides?.debug ?? false, | ||
/** enable linting */ | ||
lintOnWatch: localOverrides?.lintOnWatch ?? true, | ||
/** enable es6 by default */ | ||
forceTranspile: true, | ||
/* A detailed description of available setting is available at https://www.npmjs.com/package/ct-mapapps-gulp-js */ | ||
compress: isProduction, | ||
|
||
/* build source maps as e.g. ".js.map" */ | ||
sourceMaps: "file", | ||
|
||
/** Build Unit-Tests only in dev mode */ | ||
rollupBuildTests: !isProduction, | ||
/** Amount of Threads used to build the bundles, if there are only a few bundles 1 is ok. | ||
* More as 3 is normally not required. | ||
*/ | ||
rollupBuildMaxWorkers: localOverrides?.rollupBuildMaxWorkers ?? 1, | ||
|
||
/** List of build time flags, usage like: import { debug } from "build-config!". | ||
*/ | ||
rollupConfig: { | ||
debug: !isProduction | ||
}, | ||
|
||
/* a list of themes inside this project */ | ||
themes: [/*"sample-theme"*/], | ||
/* 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: { | ||
hasVuetify: true, | ||
themeChangeTargets: { | ||
"vuetify": [ | ||
"sample_theme" | ||
// "sample_theme" | ||
] | ||
}*/ | ||
}); | ||
}, | ||
/* A list oft target browser versions. This should be streamlined with Esri JS API requirements. */ | ||
transpileTargets: { | ||
firefox: 102, | ||
edge: 104, | ||
chrome: 104, | ||
safari: 15 | ||
}, | ||
runBrowserTests, | ||
watchFinishedReceiver() { | ||
if (localOverrides?.autoReload ?? true) { | ||
mapappsBrowserSync.state.reload(); | ||
} | ||
} | ||
}, gulp); | ||
|
||
gulp.task("default", | ||
mapappsBrowserSync.registerTask({ | ||
// on which port to listen | ||
port: localOverrides?.port ?? 9090, | ||
// activate https protocol, generates a self signed certificate for "localhost" | ||
// https://browsersync.io/docs/options#option-https | ||
https: localOverrides?.https ?? false, | ||
|
||
// to prevent auto open of browser, set this to false | ||
urlToOpen: localOverrides?.openBrowser ?? true, | ||
|
||
jsreg: { | ||
//npmDir : __dirname + "/node_modules/", | ||
npmModules: [ | ||
"mocha", | ||
"chai", | ||
"@conterra/mapapps-mocha-runner" | ||
] | ||
}, | ||
// prevent reload by browser sync (reload triggered on watch end) | ||
externalReloadTrigger: true | ||
}, gulp); | ||
|
||
gulp.task("build", | ||
gulp.series( | ||
"copy-resources", | ||
"themes-copy", | ||
gulp.parallel( | ||
//"js-lint", | ||
//"style-lint", | ||
"js-transpile", | ||
"rollup-build", | ||
"themes-compile" | ||
) | ||
) | ||
); | ||
|
||
gulp.task("lint", | ||
gulp.parallel( | ||
"js-lint" | ||
//,"style-lint" | ||
)); | ||
|
||
gulp.task("preview", | ||
gulp.series( | ||
"build", | ||
"lint", | ||
gulp.parallel( | ||
"watch", | ||
"browser-sync" | ||
) | ||
)); | ||
|
||
gulp.task("run-tests", | ||
gulp.series( | ||
"browser-sync-start", | ||
function transportTestUrls() { | ||
// transport test url to run-browser-tests | ||
// eslint-disable-next-line max-len | ||
const testsAt = mapappsBrowserSync.state.url + "/resources/jsregistry/root/@conterra/mapapps-mocha-runner/latest/mocha.html?boot=/js/tests/test-init.js&timeout=5000&test=dn_searchlayers/tests/all&reporter=tap"; | ||
runBrowserTests.push(testsAt); | ||
return Promise.resolve(); | ||
}, | ||
"run-browser-tests", | ||
"browser-sync-stop" | ||
)); | ||
|
||
gulp.task("test", | ||
gulp.series( | ||
"build", | ||
"lint", | ||
"run-tests" | ||
)); | ||
|
||
gulp.task("compress", | ||
gulp.series( | ||
"default", | ||
"themes-compress" | ||
"build", | ||
"themes-compress", | ||
"lint" | ||
) | ||
); | ||
|
||
gulp.task("default", | ||
gulp.series( | ||
"build", | ||
"lint" | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
{ | ||
"name": "test", | ||
"name": "mapapps-4-developers", | ||
"description": "test build", | ||
"version": "0.0.1", | ||
"license": "CC0-1.0", | ||
"scripts": { | ||
"check-licenses": "node ./src/support/js/check-licenses.js" | ||
}, | ||
"devDependencies": { | ||
"@conterra/ct-mapapps-typings": "4.13.1", | ||
"@conterra/mapapps-mocha-runner": "^1.0.0", | ||
"@types/arcgis-js-api": "4.22.0", | ||
"ct-mapapps-gulp-js": "^0.6.18", | ||
"vue-template-compiler": "2.6.14", | ||
"puppeteer": "^13.3.2", | ||
"eslint-config-ct-prodeng": "^1.2.5", | ||
"stylelint-config-ct-prodeng": "1.0.3", | ||
"chai": "^4.3.4", | ||
"mocha": "^9.0.0" | ||
"@conterra/ct-mapapps-typings": "4.15.0", | ||
"@conterra/mapapps-mocha-runner": "^1.1.1", | ||
"@types/arcgis-js-api": "4.26.0", | ||
"chai": "^4.3.7", | ||
"ct-mapapps-browser-sync": "0.0.27", | ||
"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" | ||
} | ||
} |
Oops, something went wrong.