Skip to content

Commit

Permalink
feat(libs): upgrade librairies (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau authored and Marc-André Barbeau committed Sep 8, 2020
1 parent e964d3f commit 0c0fd83
Show file tree
Hide file tree
Showing 360 changed files with 12,388 additions and 11,113 deletions.
13 changes: 13 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-10
IE 11
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ node_js:
- 14
- 13
- 12
- 11
- 10

before_script:
- npm install -g gulp-cli

script:
- npm run build.libs
- npm run test

addons:
chrome: stable
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![devDependencies Status](https://david-dm.org/infra-geo-ouverte/igo2-lib/dev-status.svg)](https://david-dm.org/infra-geo-ouverte/igo2-lib?type=dev)
[![Known Vulnerabilities](https://snyk.io/test/github/infra-geo-ouverte/igo2-lib/badge.svg)](https://snyk.io/test/github/infra-geo-ouverte/igo2-lib)


# IGO2 Library

This repository is home to the IGO2 Library on which IGO2 is built. IGO2 and this library are open source projects using Angular, Angular Material and OpenLayers. While IGO2 is mapping oriented, this library can easily serve other purposes as it contains many components and services that may benefit any web application.
Expand Down Expand Up @@ -47,12 +46,13 @@ Example:

### Developer Installation

Require:
Require:

| IGO2 version | Node version | Git |
|--------------|----------------------|----------|
| 1.x.x | >= 8.17.0, <= 11.15.0 | Yes |
| 0.x.x | >= 6.5.0, <= 10.18.1 | Yes |
| IGO2 version | Node version |
| ------------ | ------------ |
| > 1.5.x | >= 12, <= 14 |
| < 1.5.x | >= 8, <= 11 |
| 0.x.x | >= 6, <= 10 |

If you want to develop in IGO2 Library, it can be installed by:

Expand All @@ -65,7 +65,8 @@ If you want to develop in IGO2 Library, it can be installed by:
### Development server

Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the demo's source files.
If you modify files from the lib (../packages/*) you must run:
If you modify files from the lib (../packages/\*) you must run:

1. npm run build.libs to rebuild all the libs
2. OR
3. npm run build.geo if you have only modifyed the geo package or whatever part of the lib...
Expand Down
59 changes: 42 additions & 17 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/demo",
"index": "demo/src/index.html",
"main": "demo/src/main.ts",
Expand All @@ -41,7 +42,20 @@
],
"styles": ["demo/src/styles.scss"],
"scripts": [],
"es5BrowserSupport": true
"allowedCommonJsDependencies": [
"hammerjs",
"typy",
"jspdf",
"file-saver",
"jwt-decode",
"@turf/helpers",
"@turf/line-segment",
"@turf/meta",
"@turf/invariant",
"@turf/line-intersect",
"pbf",
"geojson-rbush"
]
},
"configurations": {
"production": {
Expand All @@ -53,18 +67,22 @@
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"sourceMap": true,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"vendorChunk": true,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "5mb",
"maximumError": "6mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
Expand Down Expand Up @@ -139,7 +157,7 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
Expand All @@ -151,7 +169,8 @@
},
"configurations": {
"production": {
"project": "packages/auth/ng-package.prod.json"
"project": "packages/auth/ng-package.prod.json",
"tsConfig": "packages/auth/tsconfig.lib.prod.json"
}
}
},
Expand Down Expand Up @@ -183,7 +202,7 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
Expand All @@ -195,7 +214,8 @@
},
"configurations": {
"production": {
"project": "packages/common/ng-package.prod.json"
"project": "packages/common/ng-package.prod.json",
"tsConfig": "packages/common/tsconfig.lib.prod.json"
}
}
},
Expand Down Expand Up @@ -227,7 +247,7 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
Expand All @@ -239,7 +259,8 @@
},
"configurations": {
"production": {
"project": "packages/core/ng-package.prod.json"
"project": "packages/core/ng-package.prod.json",
"tsConfig": "packages/core/tsconfig.lib.prod.json"
}
}
},
Expand Down Expand Up @@ -271,7 +292,7 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
Expand All @@ -283,7 +304,8 @@
},
"configurations": {
"production": {
"project": "packages/geo/ng-package.prod.json"
"project": "packages/geo/ng-package.prod.json",
"tsConfig": "packages/geo/tsconfig.lib.prod.json"
}
}
},
Expand Down Expand Up @@ -321,7 +343,8 @@
},
"configurations": {
"production": {
"project": "packages/utils/ng-package.prod.json"
"project": "packages/utils/ng-package.prod.json",
"tsConfig": "packages/utils/tsconfig.lib.prod.json"
}
}
},
Expand All @@ -345,7 +368,7 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
Expand All @@ -357,7 +380,8 @@
},
"configurations": {
"production": {
"project": "packages/context/ng-package.prod.json"
"project": "packages/context/ng-package.prod.json",
"tsConfig": "packages/context/tsconfig.lib.prod.json"
}
}
},
Expand Down Expand Up @@ -389,7 +413,7 @@
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": false,
"styleext": "scss"
"style": "scss"
}
},
"architect": {
Expand All @@ -401,7 +425,8 @@
},
"configurations": {
"production": {
"project": "packages/integration/ng-package.prod.json"
"project": "packages/integration/ng-package.prod.json",
"tsConfig": "packages/integration/tsconfig.lib.prod.json"
}
}
},
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions demo/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';

import {
MatCardModule,
MatButtonModule,
MatIconModule,
MatToolbarModule,
MatSidenavModule,
MatListModule
} from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatIconTestingModule } from '@angular/material/icon/testing';

import { IgoAuthModule } from '@igo2/auth';

Expand All @@ -27,6 +26,7 @@ describe('AppComponent', () => {
MatToolbarModule,
MatSidenavModule,
MatListModule,
MatIconTestingModule,
IgoAuthModule
],
declarations: [AppComponent]
Expand Down
4 changes: 2 additions & 2 deletions demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export class AppComponent implements OnDestroy {
) {
this.mobileQuery = media.matchMedia('(max-width: 600px)');
this._mobileQueryListener = () => changeDetectorRef.detectChanges();
this.mobileQuery.addListener(this._mobileQueryListener);
this.mobileQuery.addEventListener('change', this._mobileQueryListener);

this.renderer.addClass(document.body, this.themeClass);

this.detectOldBrowser();
}

ngOnDestroy(): void {
this.mobileQuery.removeListener(this._mobileQueryListener);
this.mobileQuery.removeEventListener('change', this._mobileQueryListener);
}

private detectOldBrowser() {
Expand Down
19 changes: 9 additions & 10 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { BrowserModule, DomSanitizer } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import {} from '@angular/platform-browser';
import {
MatIconRegistry,
MatSidenavModule,
MatToolbarModule,
MatButtonModule,
MatIconModule,
MatListModule
} from '@angular/material';
import { HammerModule } from '@angular/platform-browser';
import { MatButtonModule } from '@angular/material/button';
import { MatIconRegistry, MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { AppHomeModule } from './core/home/home.module';
import { AppActivityModule } from './core/activity/activity.module';
import { AppConfigModule } from './core/config/config.module';
Expand Down Expand Up @@ -102,7 +99,9 @@ import { AppComponent } from './app.component';

AppContextModule,

AppRoutingModule
AppRoutingModule,

HammerModule
],
bootstrap: [AppComponent]
})
Expand Down
3 changes: 1 addition & 2 deletions demo/src/app/auth/auth-form/auth-form-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Routes, RouterModule } from '@angular/router';
import { ModuleWithProviders } from '@angular/core';

import { AppAuthFormComponent } from './auth-form.component';

Expand All @@ -10,6 +9,6 @@ const routes: Routes = [
}
];

export const AppAuthFormRoutingModule: ModuleWithProviders = RouterModule.forChild(
export const AppAuthFormRoutingModule = RouterModule.forChild(
routes
);
2 changes: 1 addition & 1 deletion demo/src/app/auth/auth-form/auth-form.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { MatCardModule } from '@angular/material';
import { MatCardModule } from '@angular/material/card';

import { IgoAuthModule } from '@igo2/auth';

Expand Down
4 changes: 2 additions & 2 deletions demo/src/app/common/action/action-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Routes, RouterModule } from '@angular/router';
import { ModuleWithProviders } from '@angular/core';


import { AppActionComponent } from './action.component';

Expand All @@ -10,6 +10,6 @@ const routes: Routes = [
}
];

export const AppActionRoutingModule: ModuleWithProviders = RouterModule.forChild(
export const AppActionRoutingModule = RouterModule.forChild(
routes
);
3 changes: 2 additions & 1 deletion demo/src/app/common/action/action.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { NgModule } from '@angular/core';
import { MatButtonModule, MatCardModule } from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';

import { IgoActionModule, IgoContextMenuModule } from '@igo2/common';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Routes, RouterModule } from '@angular/router';
import { ModuleWithProviders } from '@angular/core';


import { AppDynamicComponentComponent } from './dynamic-component.component';

Expand All @@ -10,6 +10,6 @@ const routes: Routes = [
}
];

export const AppDynamicComponentRoutingModule: ModuleWithProviders = RouterModule.forChild(
export const AppDynamicComponentRoutingModule = RouterModule.forChild(
routes
);
Loading

0 comments on commit 0c0fd83

Please sign in to comment.