Skip to content

Commit

Permalink
Merge pull request #88 from GitHarpon/release-1.1
Browse files Browse the repository at this point in the history
release(1.1): déploiement v1.1.0
  • Loading branch information
Philiippe authored Feb 26, 2019
2 parents 682fa67 + ceebf45 commit b79cde1
Show file tree
Hide file tree
Showing 97 changed files with 3,862 additions and 758 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ npm-debug.log
testem.log
/typings
package-lock.json
/units

# e2e
/e2e/*.js
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ install:
- npm install
- npm run electron:linux
script:
- npm run test:unit:coverage
- npm run test:e2e
notifications:
email: false
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Cette application a été réalisée par des étudiants de Master 1 Génie de l'
Pour cela, nous avons utilisé :

- Angular v7.1.4
- Electron v2.0.7
- Electron Builder v20.28.1
- Electron v4.0.0
- Electron Builder v20.36.1
- Bootstrap 4
- le [kit de démarrage](https://github.com/maximegris/angular-electron) de maximegris

Expand All @@ -28,6 +28,14 @@ Pour assurer le fonctionnement de cette application depuis n'importe quel OS, il

Nous utiliserons aussi yarn.

Pour la gestion des mots de passes, il est nécessaire d'avoir installé le package `libsecret` sur Linux.
Selon la distribution, il faut lancer les commandes suivantes :

- Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`
- Red Hat-based: `sudo yum install libsecret-devel`
- Arch Linux: `sudo pacman -S libsecret`


### Installation de Node.js
**Windows et macOS**

Expand Down Expand Up @@ -83,6 +91,8 @@ Installer les dépendances
|`node_modules/`| Dossier contenant les modules natifs et installés. |
|`release/`| Dossier contenant la release après génération. |
|`tests/`| Dossier contenant les fichiers de test. |
|`coverage/`| Dossier contenant le résultat de la couverture de code. |
|`units/units.html`| Fichier de rapport des tests unitaires. |
|`src/styles.scss`| Feuille de style globale. |
|`src/variables.scss`| Feuille des variables de style. |
|`src/assets/`| Dossier contenant les fichiers de traduction. |
Expand All @@ -106,11 +116,18 @@ Comme expliqué plus haut, nous avons utilisé le kit de démarrage. Le fichier
|`yarn electron:linux`| Sous Linux, build l'application et crée un `.AppImage`. |
|`yarn electron:windows`| Sous Windows, build l'application et crée un `.exe`, exécutable pour les systèmes en 32 et 64 bits. |
|`yarn electron:mac`| Sous macOS, build l'application et crée un `.dmg` contenant le `.app`. |
|`yarn test:unit`| Lance les tests unitaires |
|`yarn test:unit:coverage`| Lance les tests unitaires et le couvrage de code |
|`yarn test:e2e`| Lance les tests end-to-end (e2e) |

⚠️ Il faut supprimer le dossier release avant d'en regénérer un autre ⚠️

## Lancer les tests
## Lancer les tests unitaires

Il est nécessaire d'avoir installé chrome auparavant sur son ordinateur pour lancer les tests unitaires.
Une fois cette condition réalisée, il suffit de lancé `yarn test:unit`. Le rapport est alors disponible dans `units/units.html`.

## Lancer les tests end-to-end

Comme expliqué ci-dessus, la commande `yarn test:e2e` lance les tests end-to-end. Cependant, il est nécessaire de créer une release avant de lancer cette commande.

Expand Down
7 changes: 7 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@
"polyfills": "src/polyfills-test.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"codeCoverageExclude": [
"src/app/providers/*",
"src/app/components/**",
"src/app/screens/toolbox/**",
"src/app/models/**",
"src/environments/**"
],
"scripts": [],
"styles": [
"src/styles.scss"
Expand Down
15 changes: 0 additions & 15 deletions e2e/app.e2e-spec.ts

This file was deleted.

8 changes: 0 additions & 8 deletions e2e/app.po.ts

This file was deleted.

37 changes: 0 additions & 37 deletions e2e/protractor.conf.js

This file was deleted.

12 changes: 0 additions & 12 deletions e2e/tsconfig.e2e.json

This file was deleted.

28 changes: 23 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"name": "git-harpon",
"version": "1.0.0",
"version": "1.1.0",
"description": "Open-source GUI for git",
"author": {
"name": "GitHarpon",
"email": "githarpon@gmail.com",
"url": "https://github.com/GitHarpon"
},
"license": "SEE LICENSE IN LICENSE.md",
"keywords": [
"angular",
"angular 7",
Expand Down Expand Up @@ -28,32 +35,39 @@
"electron:linux": "npm run build:prod && npx electron-builder build --linux",
"electron:windows": "npm run build:prod && npx electron-builder build --windows",
"electron:mac": "npm run build:prod && npx electron-builder build --mac",
"test": "npm run postinstall:web && ng test",
"e2e": "npm run postinstall:web && ng e2e",
"test:e2e": "mocha --timeout 15000 tests/test.js"
"test:unit": "npm run postinstall:web && ng test",
"test:unit:coverage": "npm run postinstall:web && ng test --watch=false --code-coverage",
"test:e2e": "mocha --timeout 15000 tests/*.js"
},
"dependencies": {
"@angular/animations": "^7.2.4",
"@angular/cdk": "^7.3.1",
"@angular/material": "^7.3.1",
"@angular/platform-server": "^7.1.4",
"@ng-bootstrap/ng-bootstrap": "^4.0.2",
"angular-resizable-element": "^3.2.3",
"bootstrap": "4.1.3",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"git-url-parse": "^11.1.2",
"jquery": "^3.3.1",
"karma-htmlfile-reporter": "^0.3.8",
"mocha": "^5.2.0",
"mocha-sinon": "^2.1.0",
"monaco-editor": "^0.14.3",
"ngx-clipboard": "^11.1.9",
"ngx-contextmenu": "^5.1.1",
"ngx-scrollbar": "^4.1.1",
"ngx-store": "^2.1.0",
"ngx-toastr": "^9.1.1",
"popper.js": "^1.14.7",
"rxjs-compat": "^6.3.3",
"rxjs-tslint": "^0.1.6",
"simple-git": "^1.107.0",
"sinon": "^7.2.3",
"spectron": "^5.0.0"
"spectron": "^5.0.0",
"valid-url": "^1.0.9"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.11.4",
Expand All @@ -76,7 +90,7 @@
"@types/node": "^10.12.18",
"codelyzer": "^4.5.0",
"core-js": "^2.6.1",
"electron": "^4.0.0",
"electron": "4.0.0",
"electron-builder": "20.36.1",
"electron-reload": "1.3.0",
"jasmine-core": "^3.3.0",
Expand All @@ -97,5 +111,9 @@
"wait-on": "2.1.0",
"webdriver-manager": "12.0.6",
"zone.js": "^0.8.26"
},
"browser": {
"fs": false,
"child_process": false
}
}
9 changes: 7 additions & 2 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ToolboxComponent } from './components/toolbox/toolbox.component';
import { HomeComponent } from './components/home/home.component';
import { ToolboxComponent } from './screens/toolbox/toolbox.component';
import { HomeComponent } from './screens/home/home.component';
import { PreferencesComponent } from './screens/preferences/preferences.component';

const ROUTES: Routes = [
{
Expand All @@ -17,6 +18,10 @@ const ROUTES: Routes = [
{
path: 'toolbox',
component: ToolboxComponent
},
{
path: 'preferences',
component: PreferencesComponent
}
];

Expand Down
33 changes: 0 additions & 33 deletions src/app/app.component.spec.ts

This file was deleted.

10 changes: 3 additions & 7 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ export class AppComponent {
private translate: TranslateService) {

this.translate.addLangs(['fr', 'en']);
this.translate.setDefaultLang(this.translate.getLangs()[0]);
console.log('AppConfig', AppConfig);

if (electronService.isElectron()) {
console.log('Mode electron');
console.log('Electron ipcRenderer', electronService.ipcRenderer);
console.log('NodeJS childProcess', electronService.childProcess);
if (localStorage.getItem('lang') === null || localStorage.getItem('lang') === 'fr') {
this.translate.setDefaultLang('fr');
} else {
console.log('Mode web');
this.translate.setDefaultLang('en');
}
}
}
Loading

0 comments on commit b79cde1

Please sign in to comment.