Skip to content

Commit

Permalink
feat(app) : pwa (#625)
Browse files Browse the repository at this point in the history
* feat-fix(Docs) add storedqueries mffp exemple doc - fix layer property - fix workspace duplicate (#620)

* add exemple feuillet snrc storedQuery

* doc rst format for code Json

* rst format

* rst format

* rst format

* fix workspace

* rst format

* Update config.json

Co-authored-by: Marc-André Barbeau <[email protected]>

* fix(ogc-filter docs): fix seletorType attribute (#614)

* fix(welcomewindow): trigger the welcome window if no auth url defined (#613)

Co-authored-by: Pierre-Étienne Lord <[email protected]>

* fix(mobile scroll): fix mobile scroll problem (toolbar and search settings) (#623)

* feat(igo2-lib): upgrade to 1.7.2

* 1.7.2

* feat(app) : pwa

implementation of pwa technology

* fix(app): pwa icons

* fix(app): pwa icons

better icons in manifest

* refactor(pwa): change icon size

* wip

* feat(pwa): installPrompt

implementation of the before install prompt

* fix(pwa): offline

Contexts, languages and config can now be fetched with the service worker

* feat(demo): github build is now a pwa

* Pwa (#641)

* wip

* docs(properties): add maxLayerZoomExtent property to map (#633)

* doc layerExtent

* doc layerExtent

* chore(polyfills): Error catching by textdecoder() was undefined on IE (#638)

* chore(polyfills): Error catching by textdecoder() was undefined on IE

* lint

* wip

* wip

Co-authored-by: Maxime Lamer <[email protected]>

* lint

* lint

* wip

* wip

* lint

* wip

* wip

* wip

* feat(app): validate to inject translation to initialize app.

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* chore(app): define a app_initializer for deps injection.

* app(config): define properties to promote and download data for pwa apps

* wip

* refactor(pwa): remove analytics from pwa-service

* i18n(pwa): minor changes

* wip

* chore(package): update angular service-worker

* refactor(pwa): wip

* wip

* wip

* wip

* wip

* refactor(build): build environnement

* chore(test): remove complex test for pwa services

Co-authored-by: josee666 <[email protected]>
Co-authored-by: Marc-André Barbeau <[email protected]>
Co-authored-by: Philippe Lafrenière <[email protected]>
Co-authored-by: Pierre-Étienne Lord <[email protected]>
Co-authored-by: Pierre-Étienne Lord <[email protected]>
Co-authored-by: Pierre-Etienne Lord <[email protected]>
Co-authored-by: Maxime Lamer <[email protected]>
  • Loading branch information
8 people authored Dec 2, 2022
1 parent 92fb147 commit 38f4070
Show file tree
Hide file tree
Showing 28 changed files with 1,089 additions and 88 deletions.
41 changes: 36 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"glob": "**/*",
"input": "./node_modules/@igo2/geo/assets/",
"output": "./assets/igo2/geo/"
}
},
"src/manifest.webmanifest"
],
"styles": ["src/styles.scss"],
"scripts": [],
Expand Down Expand Up @@ -124,7 +125,8 @@
"aot": true,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": false
"buildOptimizer": false,
"serviceWorker": false
},
"developpement": {
"buildOptimizer": false,
Expand Down Expand Up @@ -154,7 +156,32 @@
"aot": true,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": false
"buildOptimizer": false,
"serviceWorker": false
},
"pwa": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "12kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.pwa.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": false,
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
}
}
},
Expand Down Expand Up @@ -191,14 +218,18 @@
"karmaConfig": "src/karma.conf.js",
"styles": ["src/styles.scss"],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets",
"src/manifest.webmanifest"
],
"stylePreprocessorOptions": {
"includePaths": [
"src/style/partial",
"src/app/pages/portal",
"node_modules"
]
},
"assets": ["src/favicon.ico", "src/assets"]
}
}
},
"lint": {
Expand Down
12 changes: 9 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/*jshint esversion: 6 */
var gulp = require('gulp');
const gulp = require('gulp');
const bump = require('gulp-bump');
const package = require('./package.json')

gulp.task('copyLocaleFromLib', done => {
gulp
Expand All @@ -13,5 +15,9 @@ gulp.task('watch:locale', function () {
gulp.watch('./node_modules/@igo2/core/locale/*.json', gulp.series('copyLocaleFromLib'));
});



gulp.task('bumpPwaVersionDev', done => {
gulp.src(['./ngsw-config.json'])
.pipe(bump({ type: 'prerelease' }))
.pipe(gulp.dest('./'));
done();
});
56 changes: 56 additions & 0 deletions ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"appData": {
"changelog": "Initial version",
"version": "1.13.4"
},
"assetGroups": [
{
"name": "data",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/data/**"
]
}
},
{
"name": "contexts",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/contexts/**"
]
}
},
{
"name": "app",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js",
"/locale/**",
"/config/**"
]
}
}, {
"name": "assets",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}
Loading

0 comments on commit 38f4070

Please sign in to comment.