feat: migrate from electron-webpack to electron-forge
Electron upgrade : 10.1.3 => 13.1.7 Angular upgrade : 10.1.3 => 12.1.2
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
# 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-11 # For IE 9-11 support, remove 'not'.
|
||||
28
.eslintrc.json
Normal file
28
.eslintrc.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:import/typescript"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"node": {
|
||||
"extensions": [
|
||||
".js",
|
||||
".jsx",
|
||||
".ts",
|
||||
".tsx"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
121
.gitignore
vendored
121
.gitignore
vendored
@@ -1,46 +1,93 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
.DS_Store
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
speed-measure-plugin*.json
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# TypeScript cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless/
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# Webpack
|
||||
.webpack/
|
||||
|
||||
# Electron-Forge
|
||||
out/
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Thumbs.db
|
||||
@@ -4,7 +4,7 @@ os:
|
||||
- linux
|
||||
- osx
|
||||
node_js:
|
||||
- "12"
|
||||
- "14"
|
||||
addons:
|
||||
chrome: stable
|
||||
services:
|
||||
@@ -12,5 +12,5 @@ services:
|
||||
install:
|
||||
- npm install
|
||||
script:
|
||||
- npm run e2e
|
||||
- npm run package
|
||||
- npm run test:electron-e2e
|
||||
- npm run make
|
||||
|
||||
59
CHANGELOG.md
59
CHANGELOG.md
@@ -1,48 +1,41 @@
|
||||
## 1.0.2 (2020-09-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* reopening window crash on macos ([f442df7](https://github.com/sourcygen/electron-angular-quick-start/commit/f442df72c4120fb616d21c5c4e245a5eb478f57e))
|
||||
|
||||
- reopening window crash on macos ([f442df7](https://github.com/sourcygen/electron-angular-quick-start/commit/f442df72c4120fb616d21c5c4e245a5eb478f57e))
|
||||
|
||||
### Features
|
||||
|
||||
* disable remote content execution ([0c82cf4](https://github.com/sourcygen/electron-angular-quick-start/commit/0c82cf425930de7368debfbc6176a3ef8ed7591e))
|
||||
* adapt angular part ([83301e0](https://github.com/sourcygen/electron-angular-quick-start/commit/83301e0fe7387e791d23f7c1d6cdaeb1f53e3cf4))
|
||||
* adapt electron part ([73acf88](https://github.com/sourcygen/electron-angular-quick-start/commit/73acf88a079984e50c15e23e5ad0aa98b0a7c2a1))
|
||||
* add electron dependencies ([f506c0c](https://github.com/sourcygen/electron-angular-quick-start/commit/f506c0c2ab613ec0d72863f5a30c2c1ce553dcd2))
|
||||
* add electron e2e launch scripts ([7e02b37](https://github.com/sourcygen/electron-angular-quick-start/commit/7e02b37b10f54f7bbb66e88f7e433ba67594287b))
|
||||
* add electron packaging scripts ([afd8916](https://github.com/sourcygen/electron-angular-quick-start/commit/afd8916d7143b258ed273d613f15135f91cb8edd))
|
||||
* add spectron and utility dependencies ([a100e3c](https://github.com/sourcygen/electron-angular-quick-start/commit/a100e3c488fde1cc2d60229f47032331b201f7b5))
|
||||
* angular upgrade : 9.1.1 => 10.1.3 ([b3a22e8](https://github.com/sourcygen/electron-angular-quick-start/commit/b3a22e8023b56d2e9707b98ec871c496d054a74d))
|
||||
* change project structure to meet targeted architecture ([9c8788f](https://github.com/sourcygen/electron-angular-quick-start/commit/9c8788fb2e419ae63c3a6545f4c5966547232702))
|
||||
* change project structure to meet targeted architecture ([ea90fd8](https://github.com/sourcygen/electron-angular-quick-start/commit/ea90fd845f8188c5fd4f867d7ec7f80ffd1b6e3f))
|
||||
* conventional commit setup ([4a0397f](https://github.com/sourcygen/electron-angular-quick-start/commit/4a0397f56e10e6e88312eeda2f9716d4314b1ea0))
|
||||
* decrease security in e2e tests ([8543cf1](https://github.com/sourcygen/electron-angular-quick-start/commit/8543cf148c498caa3e3298d8f08b14d16b5426b0))
|
||||
* electron upgrade : 8.2.3 => 10.1.3 ([c53b0d4](https://github.com/sourcygen/electron-angular-quick-start/commit/c53b0d497ea5d0823d425b445449cff2a9c1ddc7))
|
||||
* env config setup ([8822440](https://github.com/sourcygen/electron-angular-quick-start/commit/8822440f7dfa4452b588520cca5179121b276188))
|
||||
* i18n setup with ngx-translate ([f17719c](https://github.com/sourcygen/electron-angular-quick-start/commit/f17719c7e8d4c7798b299a6d500712f903ddda3e))
|
||||
* icon settings ([720223e](https://github.com/sourcygen/electron-angular-quick-start/commit/720223ec7ff4984445dcb52fe06ffe3386756367))
|
||||
* init electron e2e code source ([45a02e3](https://github.com/sourcygen/electron-angular-quick-start/commit/45a02e392c0fd755df33760db7f4adbbd31d9616))
|
||||
* init new angular project with angular cli ([cae7f62](https://github.com/sourcygen/electron-angular-quick-start/commit/cae7f629aafe69edb9aaaa6907615e5a2138b05a))
|
||||
* init shared code source ([647889c](https://github.com/sourcygen/electron-angular-quick-start/commit/647889cd70d8d334122ea33c376f8cb51cf3fe7d))
|
||||
* log setup with winston ([fd598bb](https://github.com/sourcygen/electron-angular-quick-start/commit/fd598bb10de942869a857e8927831aa87f768024))
|
||||
* move production dependencies into development dependencies ([47c74d0](https://github.com/sourcygen/electron-angular-quick-start/commit/47c74d015d130a15768be5e783b80f9bfcc97754))
|
||||
* other dependencies upgrade ([5db39a1](https://github.com/sourcygen/electron-angular-quick-start/commit/5db39a1f8b7135d1ed668dd4a77674bbfd9f4ef6))
|
||||
* packaging config ([2559e97](https://github.com/sourcygen/electron-angular-quick-start/commit/2559e973dcf1478f81e25d6acb7332f3edf91dcc))
|
||||
* use npm instead of yarn (issues with binaries) ([29e4dd9](https://github.com/sourcygen/electron-angular-quick-start/commit/29e4dd95bae61025faf820d141206deb81fdcf61))
|
||||
|
||||
|
||||
- disable remote content execution ([0c82cf4](https://github.com/sourcygen/electron-angular-quick-start/commit/0c82cf425930de7368debfbc6176a3ef8ed7591e))
|
||||
- adapt angular part ([83301e0](https://github.com/sourcygen/electron-angular-quick-start/commit/83301e0fe7387e791d23f7c1d6cdaeb1f53e3cf4))
|
||||
- adapt electron part ([73acf88](https://github.com/sourcygen/electron-angular-quick-start/commit/73acf88a079984e50c15e23e5ad0aa98b0a7c2a1))
|
||||
- add electron dependencies ([f506c0c](https://github.com/sourcygen/electron-angular-quick-start/commit/f506c0c2ab613ec0d72863f5a30c2c1ce553dcd2))
|
||||
- add electron e2e launch scripts ([7e02b37](https://github.com/sourcygen/electron-angular-quick-start/commit/7e02b37b10f54f7bbb66e88f7e433ba67594287b))
|
||||
- add electron packaging scripts ([afd8916](https://github.com/sourcygen/electron-angular-quick-start/commit/afd8916d7143b258ed273d613f15135f91cb8edd))
|
||||
- add spectron and utility dependencies ([a100e3c](https://github.com/sourcygen/electron-angular-quick-start/commit/a100e3c488fde1cc2d60229f47032331b201f7b5))
|
||||
- angular upgrade : 9.1.1 => 10.1.3 ([b3a22e8](https://github.com/sourcygen/electron-angular-quick-start/commit/b3a22e8023b56d2e9707b98ec871c496d054a74d))
|
||||
- change project structure to meet targeted architecture ([9c8788f](https://github.com/sourcygen/electron-angular-quick-start/commit/9c8788fb2e419ae63c3a6545f4c5966547232702))
|
||||
- change project structure to meet targeted architecture ([ea90fd8](https://github.com/sourcygen/electron-angular-quick-start/commit/ea90fd845f8188c5fd4f867d7ec7f80ffd1b6e3f))
|
||||
- conventional commit setup ([4a0397f](https://github.com/sourcygen/electron-angular-quick-start/commit/4a0397f56e10e6e88312eeda2f9716d4314b1ea0))
|
||||
- decrease security in e2e tests ([8543cf1](https://github.com/sourcygen/electron-angular-quick-start/commit/8543cf148c498caa3e3298d8f08b14d16b5426b0))
|
||||
- electron upgrade : 8.2.3 => 10.1.3 ([c53b0d4](https://github.com/sourcygen/electron-angular-quick-start/commit/c53b0d497ea5d0823d425b445449cff2a9c1ddc7))
|
||||
- env config setup ([8822440](https://github.com/sourcygen/electron-angular-quick-start/commit/8822440f7dfa4452b588520cca5179121b276188))
|
||||
- i18n setup with ngx-translate ([f17719c](https://github.com/sourcygen/electron-angular-quick-start/commit/f17719c7e8d4c7798b299a6d500712f903ddda3e))
|
||||
- icon settings ([720223e](https://github.com/sourcygen/electron-angular-quick-start/commit/720223ec7ff4984445dcb52fe06ffe3386756367))
|
||||
- init electron e2e code source ([45a02e3](https://github.com/sourcygen/electron-angular-quick-start/commit/45a02e392c0fd755df33760db7f4adbbd31d9616))
|
||||
- init new angular project with angular cli ([cae7f62](https://github.com/sourcygen/electron-angular-quick-start/commit/cae7f629aafe69edb9aaaa6907615e5a2138b05a))
|
||||
- init shared code source ([647889c](https://github.com/sourcygen/electron-angular-quick-start/commit/647889cd70d8d334122ea33c376f8cb51cf3fe7d))
|
||||
- log setup with winston ([fd598bb](https://github.com/sourcygen/electron-angular-quick-start/commit/fd598bb10de942869a857e8927831aa87f768024))
|
||||
- move production dependencies into development dependencies ([47c74d0](https://github.com/sourcygen/electron-angular-quick-start/commit/47c74d015d130a15768be5e783b80f9bfcc97754))
|
||||
- other dependencies upgrade ([5db39a1](https://github.com/sourcygen/electron-angular-quick-start/commit/5db39a1f8b7135d1ed668dd4a77674bbfd9f4ef6))
|
||||
- packaging config ([2559e97](https://github.com/sourcygen/electron-angular-quick-start/commit/2559e973dcf1478f81e25d6acb7332f3edf91dcc))
|
||||
- use npm instead of yarn (issues with binaries) ([29e4dd9](https://github.com/sourcygen/electron-angular-quick-start/commit/29e4dd95bae61025faf820d141206deb81fdcf61))
|
||||
|
||||
## [1.0.1](https://github.com/sourcygen/electron-angular-quick-start/compare/v1.0.0...v1.0.1) (2020-04-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* reopening window crash on macos ([f442df7](https://github.com/sourcygen/electron-angular-quick-start/commit/f442df72c4120fb616d21c5c4e245a5eb478f57e))
|
||||
|
||||
|
||||
- reopening window crash on macos ([f442df7](https://github.com/sourcygen/electron-angular-quick-start/commit/f442df72c4120fb616d21c5c4e245a5eb478f57e))
|
||||
|
||||
# 1.0.0 (2020-04-30)
|
||||
|
||||
|
||||
64
README.md
64
README.md
@@ -16,36 +16,33 @@ Depending on your need, putting up [Electron](https://www.electronjs.org/ "Elect
|
||||
|
||||
### Main features :
|
||||
|
||||
- This project is based on last [Angular](https://angular.io/ "Angular") version with required dependencies for [Electron](https://www.electronjs.org/ "Electron").
|
||||
- This project is also written in [Typescript](https://www.typescriptlang.org/) and includes test samples ([Jasmine](https://jasmine.github.io/) and [Spectron](https://www.electronjs.org/spectron)).
|
||||
- This project is based on last [Angular 12](https://angular.io/ "Angular") version with required dependencies for [Electron 13](https://www.electronjs.org/ "Electron").
|
||||
- This project is also written in [Typescript 4](https://www.typescriptlang.org/) and includes test samples ([Jasmine](https://jasmine.github.io/) and [Spectron 15](https://www.electronjs.org/spectron)).
|
||||
- The app is runnable `on desktop` (with **live-reload** in `development mode`).
|
||||
- The app is also runnable `on browser` but **without Electron features**.
|
||||
- You are granted a minimal size for your app thanks to `electron-webpack`.
|
||||
- You can also generate your platform packages thanks to `electron-builder`.
|
||||
- You can generate your platform distributables thanks to [`electron-forge`](https://www.electronforge.io/).
|
||||
- You are also granted a minimal size for your app thanks to the packaging based on its[`webpack-template`](https://www.electronforge.io/templates/typescript-+-webpack-template).
|
||||
|
||||
### Project structure :
|
||||
|
||||
```
|
||||
electron-angular-quick-start
|
||||
├── README.md
|
||||
├── angular.json
|
||||
├── browserslist
|
||||
├── e2e
|
||||
│ ├── angular # Angular end-to-end test directory
|
||||
│ └── electron # Electron end-to-end test directory
|
||||
├── electron-builder.json
|
||||
├── electron-webpack.json
|
||||
├── karma.conf.js
|
||||
├── package-lock.json
|
||||
├── package.json
|
||||
├── src
|
||||
│ ├── angular # Angular source directory (web part)
|
||||
│ ├── electron # Electron source directory (desktop part)
|
||||
│ └── shared # Shared source directory (common part)
|
||||
├── tsconfig.app.json
|
||||
├── tsconfig.json
|
||||
├── tsconfig.spec.json
|
||||
└── tslint.json
|
||||
├── ./CHANGELOG.md
|
||||
├── ./LICENSE
|
||||
├── ./README.md
|
||||
├── ./_config.yml
|
||||
├── ./commitlint.config.js
|
||||
├── ./package-lock.json
|
||||
├── ./package.json
|
||||
├── ./tsconfig.json
|
||||
├── ./webpack.main.config.js
|
||||
├── ./webpack.plugins.js
|
||||
├── ./webpack.renderer.config.js
|
||||
├── ./webpack.rules.js
|
||||
└── ./workspaces
|
||||
├── ./workspaces/angular-app # Angular source directory (web renderer part)
|
||||
├── ./workspaces/electron-app # Electron source directory (main & preload part)
|
||||
├── ./workspaces/electron-e2e # Electron end-to-end test directory
|
||||
└── ./workspaces/shared-lib # Shared source directory (common part)
|
||||
```
|
||||
|
||||
## Getting started
|
||||
@@ -68,16 +65,15 @@ npm start
|
||||
|
||||
## How to use
|
||||
|
||||
| Command | Description |
|
||||
| ---------------------- | ----------------------------------------- |
|
||||
| `npm run install` | Install dependencies |
|
||||
| `npm run start` | Run the app on desktop (dev mode) |
|
||||
| `npm run ng:serve` | Run the app on browser (dev mode) |
|
||||
| `npm run e2e` | Run glogbal end-to-end tests |
|
||||
| `npm run ng:e2e` | Run **angular** end-to-end tests |
|
||||
| `npm run electron:e2e` | Run **electron** end-to-end tests |
|
||||
| `npm run build` | Build artifact content |
|
||||
| `npm run package` | Generate platform packages (dist/release) |
|
||||
| Command | Description |
|
||||
| --------------------------- | ---------------------------------------- |
|
||||
| `npm run install` | Install dependencies |
|
||||
| `npm run start` | Run the app on desktop (dev mode) |
|
||||
| `npm run start:angular-app` | Run the app on browser (dev mode) |
|
||||
| `npm run test:electron-e2e` | Run **electron** end-to-end tests |
|
||||
| `npm run package` | Build and prepare application content |
|
||||
| `npm run make` | Generate platform distributables (./out) |
|
||||
| `npm run clean` | Delete generated outputs |
|
||||
|
||||
## Resources
|
||||
|
||||
|
||||
117
angular.json
117
angular.json
@@ -1,117 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"electron-angular-quick-start": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src/angular",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/angular",
|
||||
"index": "src/angular/index.html",
|
||||
"main": "src/angular/main.ts",
|
||||
"polyfills": "src/angular/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"aot": true,
|
||||
"assets": ["src/angular/favicon.ico", "src/angular/assets"],
|
||||
"styles": ["src/angular/styles.scss"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/angular/environments/environment.ts",
|
||||
"with": "src/angular/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "10kb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "electron-angular-quick-start:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "electron-angular-quick-start:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "electron-angular-quick-start:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/angular/test.ts",
|
||||
"polyfills": "src/angular/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": ["src/angular/favicon.ico", "src/angular/assets"],
|
||||
"styles": ["src/angular/styles.scss"],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.app.json",
|
||||
"tsconfig.spec.json",
|
||||
"e2e/angular/tsconfig.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/angular/protractor.conf.js",
|
||||
"devServerTarget": "electron-angular-quick-start:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "electron-angular-quick-start:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "electron-angular-quick-start"
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require("jasmine-spec-reporter");
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: ["./src/**/*.e2e-spec.ts"],
|
||||
capabilities: {
|
||||
browserName: "chrome",
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: "http://localhost:4200/",
|
||||
framework: "jasmine",
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function () {},
|
||||
},
|
||||
onPrepare() {
|
||||
require("ts-node").register({
|
||||
project: require("path").join(__dirname, "./tsconfig.json"),
|
||||
});
|
||||
jasmine
|
||||
.getEnv()
|
||||
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
},
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
import { AppPage } from './app.po';
|
||||
import { browser, logging } from 'protractor';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('electron-angular-quick-start app is running!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
@@ -1,11 +0,0 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo(): Promise<unknown> {
|
||||
return browser.get(browser.baseUrl) as Promise<unknown>;
|
||||
}
|
||||
|
||||
getTitleText(): Promise<string> {
|
||||
return element(by.css('app-root .content span')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es2018",
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"productName": "electron-angular-quick-start",
|
||||
"directories": {
|
||||
"app": "dist/build",
|
||||
"buildResources": "dist/build",
|
||||
"output": "dist/release"
|
||||
},
|
||||
"files": [
|
||||
"**/*",
|
||||
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",
|
||||
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
|
||||
"!**/node_modules/*.d.ts",
|
||||
"!**/node_modules/.bin",
|
||||
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}",
|
||||
"!.editorconfig",
|
||||
"!**/._*",
|
||||
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}",
|
||||
"!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}",
|
||||
"!**/{appveyor.yml,.travis.yml,circle.yml}",
|
||||
"!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}"
|
||||
],
|
||||
"linux": {
|
||||
"icon": "dist/build/static/icons/icon.png",
|
||||
"target": ["AppImage"]
|
||||
},
|
||||
"mac": {
|
||||
"icon": "dist/build/static/icons/icon.png",
|
||||
"target": ["dmg"]
|
||||
},
|
||||
"win": {
|
||||
"icon": "dist/build/static/icons/icon.png",
|
||||
"target": ["NSIS"]
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"staticSourceDirectory": "src/static",
|
||||
"main": {
|
||||
"extraEntries": ["@/preload.js"],
|
||||
"sourceDirectory": "dist/electron"
|
||||
},
|
||||
"renderer": {
|
||||
"sourceDirectory": null
|
||||
}
|
||||
}
|
||||
54373
package-lock.json
generated
54373
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
198
package.json
198
package.json
@@ -1,99 +1,149 @@
|
||||
{
|
||||
"name": "electron-angular-quick-start",
|
||||
"productName": "electron-angular-quick-start",
|
||||
"version": "1.0.2",
|
||||
"description": "An Electron and Angular Quick-starter",
|
||||
"repository": "https://github.com/sourcygen/electron-angular-quick-start.git",
|
||||
"author": "Sourcygen",
|
||||
"license": "MIT",
|
||||
"main": ".webpack/main",
|
||||
"keywords": [
|
||||
"angular",
|
||||
"angular 10",
|
||||
"angular 12",
|
||||
"electron",
|
||||
"electron 8",
|
||||
"electron 13",
|
||||
"typescript",
|
||||
"typescript 4",
|
||||
"spectron",
|
||||
"spectron 10",
|
||||
"spectron 15",
|
||||
"scss",
|
||||
"live reload"
|
||||
],
|
||||
"workspaces": [
|
||||
"workspaces/angular-app",
|
||||
"workspaces/shared-lib"
|
||||
],
|
||||
"watch": {
|
||||
"restart-electron-app": {
|
||||
"patterns": [
|
||||
"workspaces/electron-app",
|
||||
"workspaces/shared-lib"
|
||||
],
|
||||
"extensions": "ts,tsx"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"ng:test": "ng test",
|
||||
"ng:lint": "ng lint",
|
||||
"ng:e2e": "ng e2e",
|
||||
"ng:serve": "ng serve",
|
||||
"ng:build": "ng build --prod --base-href ./",
|
||||
"electron:e2e": "npm run build && cross-env X_NODE_ENV=e2e-test node e2e/electron/jasmine.js",
|
||||
"electron:serve": "wait-on http://localhost:4200 && npm-run-all -p electron:build:tsc electron:build:webpack",
|
||||
"electron:build:tsc": "tsc -b src/electron -w",
|
||||
"electron:build:webpack": "wait-on dist/electron/preload.js && electron-webpack dev",
|
||||
"electron:build": "tsc -b src/electron && electron-webpack",
|
||||
"e2e": "npm run ng:e2e && npm run electron:e2e",
|
||||
"start": "del -f dist && npm-run-all -p ng:serve electron:serve",
|
||||
"build:dist": "del -f dist && npm run ng:build && npm run electron:build",
|
||||
"build:copy:ng": "cpy '**/*' '../build' --cwd=dist/angular --parents",
|
||||
"build:copy:static": "cpy 'static' '../dist/build' --cwd=src --parents",
|
||||
"build:copy:electron": "cpy '**/*' '../build' --cwd=dist/main --parents && npm run build:copy:static",
|
||||
"build:copy": "cpy package.json dist/build && npm run build:copy:ng && npm run build:copy:electron",
|
||||
"build": "npm run build:dist && npm run build:copy && cd dist/build && npm run --prod",
|
||||
"package": "npm run build && electron-builder -p never",
|
||||
"start": "npm-run-all -p start:shared-lib start:angular-app start:electron-app",
|
||||
"start:shared-lib": "tsc -b workspaces/shared-lib -w",
|
||||
"start:angular-app": "cd workspaces/angular-app && npm run start",
|
||||
"start:electron-app": "wait-on http://localhost:4200 && npm-watch restart-electron-app",
|
||||
"restart-electron-app": "electron-forge start",
|
||||
"package": "npm run package:angular-app && npm run package:electron-app",
|
||||
"package:angular-app": "cd workspaces/angular-app && npm run package",
|
||||
"package:electron-app": "electron-forge package",
|
||||
"make": "npm run package:angular-app && electron-forge make",
|
||||
"publish": "electron-forge publish",
|
||||
"lint": "eslint --ext .ts .",
|
||||
"test:electron-e2e": "npm run package && cross-env X_NODE_ENV=e2e-test node workspaces/electron-e2e/jasmine.js",
|
||||
"clean": "del -f .webpack out node_modules workspaces/shared-lib/dist workspaces/angular-app/node_modules workspaces/angular-app/dist",
|
||||
"version": "npx conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"source-map-support": "^0.5.17"
|
||||
"config": {
|
||||
"forge": {
|
||||
"packagerConfig": {},
|
||||
"makers": [
|
||||
{
|
||||
"name": "@electron-forge/maker-dmg",
|
||||
"config": {
|
||||
"name": "EAQS"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-squirrel",
|
||||
"config": {
|
||||
"name": "electron_angular_quick_start"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-zip",
|
||||
"platforms": []
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-deb",
|
||||
"config": {}
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-rpm",
|
||||
"config": {}
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"@electron-forge/plugin-webpack",
|
||||
{
|
||||
"mainConfig": "./webpack.main.config.js",
|
||||
"renderer": {
|
||||
"config": "./webpack.renderer.config.js",
|
||||
"entryPoints": [
|
||||
{
|
||||
"html": "./workspaces/electron-app/renderer/index.html",
|
||||
"js": "./workspaces/electron-app/renderer/index.ts",
|
||||
"name": "main_window",
|
||||
"preload": {
|
||||
"js": "./workspaces/electron-app/renderer/preload.ts"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.1001.3",
|
||||
"@angular/animations": "~10.1.3",
|
||||
"@angular/cli": "~10.1.3",
|
||||
"@angular/common": "~10.1.3",
|
||||
"@angular/compiler": "~10.1.3",
|
||||
"@angular/compiler-cli": "~10.1.3",
|
||||
"@angular/core": "~10.1.3",
|
||||
"@angular/forms": "~10.1.3",
|
||||
"@angular/language-service": "~10.1.3",
|
||||
"@angular/platform-browser": "~10.1.3",
|
||||
"@angular/platform-browser-dynamic": "~10.1.3",
|
||||
"@angular/router": "~10.1.3",
|
||||
"@commitlint/cli": "^11.0.0",
|
||||
"@commitlint/config-conventional": "^11.0.0",
|
||||
"@ngx-translate/core": "^13.0.0",
|
||||
"@ngx-translate/http-loader": "^6.0.0",
|
||||
"@types/jasmine": "~3.5.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^14.11.2",
|
||||
"chromedriver": "^85.0.1",
|
||||
"codelyzer": "^6.0.0",
|
||||
"conventional-changelog-cli": "^2.0.31",
|
||||
"cpy-cli": "^3.1.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"del-cli": "^3.0.0",
|
||||
"electron": "^10.1.3",
|
||||
"electron-builder": "^22.5.1",
|
||||
"electron-webpack": "^2.8.2",
|
||||
"fs-extra": "^9.0.0",
|
||||
"husky": "^4.2.5",
|
||||
"jasmine-core": "^3.6.0",
|
||||
"jasmine-spec-reporter": "^6.0.0",
|
||||
"karma": "^5.2.3",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.0",
|
||||
"@commitlint/cli": "^12.1.4",
|
||||
"@commitlint/config-conventional": "^12.1.4",
|
||||
"@electron-forge/cli": "^6.0.0-beta.57",
|
||||
"@electron-forge/maker-deb": "^6.0.0-beta.57",
|
||||
"@electron-forge/maker-dmg": "^6.0.0-beta.58",
|
||||
"@electron-forge/maker-rpm": "^6.0.0-beta.57",
|
||||
"@electron-forge/maker-squirrel": "^6.0.0-beta.57",
|
||||
"@electron-forge/maker-zip": "^6.0.0-beta.57",
|
||||
"@electron-forge/plugin-webpack": "6.0.0-beta.57",
|
||||
"@types/jasmine": "^3.8.1",
|
||||
"@types/jasminewd2": "^2.0.10",
|
||||
"@types/lodash": "^4.14.171",
|
||||
"@types/node": "^14.17.5",
|
||||
"@typescript-eslint/eslint-plugin": "^4.0.1",
|
||||
"@typescript-eslint/parser": "^4.0.1",
|
||||
"@vercel/webpack-asset-relocator-loader": "^1.6.0",
|
||||
"conventional-changelog-cli": "^2.1.1",
|
||||
"copy-webpack-plugin": "^9.0.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^5.0.0",
|
||||
"del-cli": "^4.0.1",
|
||||
"electron": "^13.1.7",
|
||||
"eslint": "^7.6.0",
|
||||
"eslint-plugin-import": "^2.20.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.0.1",
|
||||
"husky": "^7.0.1",
|
||||
"jasmine": "^3.8.0",
|
||||
"jasmine-core": "^3.8.0",
|
||||
"jasmine-spec-reporter": "^7.0.0",
|
||||
"node-loader": "^2.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"protractor": "~7.0.0",
|
||||
"rxjs": "^6.6.3",
|
||||
"spectron": "^12.0.0",
|
||||
"ts-node": "^9.0.0",
|
||||
"tslib": "^2.0.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.0.3",
|
||||
"wait-on": "^5.2.0",
|
||||
"webpack": "^4.42.1",
|
||||
"winston": "^3.2.1",
|
||||
"zone.js": "^0.10.3"
|
||||
"npm-watch": "^0.10.0",
|
||||
"spectron": "^15.0.0",
|
||||
"style-loader": "^2.0.0",
|
||||
"ts-loader": "^9.2.2",
|
||||
"ts-node": "^10.1.0",
|
||||
"typescript": "^4.0.2",
|
||||
"wait-on": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"winston": "^3.3.3"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
|
||||
const routes: Routes = [];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
@@ -1,20 +0,0 @@
|
||||
import * as fs from 'fs-extra';
|
||||
import * as _ from 'lodash';
|
||||
import * as path from 'path';
|
||||
import { App } from './components/app';
|
||||
|
||||
declare const global: any;
|
||||
declare const __static: string;
|
||||
|
||||
// Load config
|
||||
const currentEnv = process.env.X_NODE_ENV || process.env.NODE_ENV;
|
||||
const appConfig =
|
||||
currentEnv === 'development'
|
||||
? fs.readJsonSync(path.join(__static, 'config.json'))
|
||||
: fs.readJsonSync(path.join(__dirname, 'static/config.json'));
|
||||
const defaultConf = appConfig.development;
|
||||
const currentConf = appConfig[currentEnv];
|
||||
global.gConfig = _.merge(defaultConf, currentConf);
|
||||
|
||||
// Launch app
|
||||
App.launch();
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/electron",
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"baseUrl": "../"
|
||||
},
|
||||
"references": [{ "path": "../shared" }],
|
||||
"include": ["./**/*.ts"]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"files": ["src/angular/main.ts", "src/angular/polyfills.ts"],
|
||||
"include": ["src/angular/**/*.d.ts"]
|
||||
}
|
||||
@@ -1,20 +1,23 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./src/",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowJs": true,
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"lib": ["es2018", "dom"]
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"outDir": "dist",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"paths": {
|
||||
"*": ["node_modules/*"]
|
||||
}
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true
|
||||
}
|
||||
"include": [
|
||||
"workspaces/electron-app/**/*",
|
||||
"workspaces/electron-e2e/**/*"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/angular/test.ts", "src/angular/polyfills.ts"],
|
||||
"include": ["src/angular/**/*.spec.ts", "src/angular/**/*.d.ts"]
|
||||
}
|
||||
148
tslint.json
148
tslint.json
@@ -1,148 +0,0 @@
|
||||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"align": {
|
||||
"options": [
|
||||
"parameters",
|
||||
"statements"
|
||||
]
|
||||
},
|
||||
"array-type": false,
|
||||
"arrow-return-shorthand": true,
|
||||
"curly": true,
|
||||
"deprecation": {
|
||||
"severity": "warning"
|
||||
},
|
||||
"component-class-suffix": true,
|
||||
"contextual-lifecycle": true,
|
||||
"directive-class-suffix": true,
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"app",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"app",
|
||||
"kebab-case"
|
||||
],
|
||||
"eofline": true,
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs/Rx"
|
||||
],
|
||||
"import-spacing": true,
|
||||
"indent": {
|
||||
"options": [
|
||||
"spaces"
|
||||
]
|
||||
},
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": [
|
||||
true,
|
||||
140
|
||||
],
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-empty": false,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-non-null-assertion": true,
|
||||
"no-redundant-jsdoc": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"semicolon": {
|
||||
"options": [
|
||||
"always"
|
||||
]
|
||||
},
|
||||
"space-before-function-paren": {
|
||||
"options": {
|
||||
"anonymous": "never",
|
||||
"asyncArrow": "always",
|
||||
"constructor": "never",
|
||||
"method": "never",
|
||||
"named": "never"
|
||||
}
|
||||
},
|
||||
"typedef-whitespace": {
|
||||
"options": [
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
},
|
||||
{
|
||||
"call-signature": "onespace",
|
||||
"index-signature": "onespace",
|
||||
"parameter": "onespace",
|
||||
"property-declaration": "onespace",
|
||||
"variable-declaration": "onespace"
|
||||
}
|
||||
]
|
||||
},
|
||||
"variable-name": {
|
||||
"options": [
|
||||
"ban-keywords",
|
||||
"check-format",
|
||||
"allow-pascal-case"
|
||||
]
|
||||
},
|
||||
"whitespace": {
|
||||
"options": [
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast"
|
||||
]
|
||||
},
|
||||
"no-conflicting-lifecycle": true,
|
||||
"no-host-metadata-property": true,
|
||||
"no-input-rename": true,
|
||||
"no-inputs-metadata-property": true,
|
||||
"no-output-native": true,
|
||||
"no-output-on-prefix": true,
|
||||
"no-output-rename": true,
|
||||
"no-outputs-metadata-property": true,
|
||||
"template-banana-in-box": true,
|
||||
"template-no-negated-async": true,
|
||||
"use-lifecycle-interface": true,
|
||||
"use-pipe-transform-interface": true
|
||||
},
|
||||
"rulesDirectory": [
|
||||
"codelyzer"
|
||||
]
|
||||
}
|
||||
30
webpack.main.config.js
Normal file
30
webpack.main.config.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const path = require("path");
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* This is the main entry point for your application, it's the first file
|
||||
* that runs in the main process.
|
||||
*/
|
||||
entry: './workspaces/electron-app/main/index.ts',
|
||||
// Put your normal webpack config below here
|
||||
module: {
|
||||
rules: require('./webpack.rules'),
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
|
||||
modules: [path.resolve(__dirname, "node_modules"), "node_modules"]
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{ from: "workspaces/electron-app/main/assets" },
|
||||
{
|
||||
from: "workspaces/angular-app/dist",
|
||||
to: "../renderer/angular_window",
|
||||
noErrorOnMissing: true
|
||||
}
|
||||
],
|
||||
}),
|
||||
],
|
||||
};
|
||||
5
webpack.plugins.js
Normal file
5
webpack.plugins.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
|
||||
module.exports = [
|
||||
new ForkTsCheckerWebpackPlugin()
|
||||
];
|
||||
19
webpack.renderer.config.js
Normal file
19
webpack.renderer.config.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const path = require("path");
|
||||
const rules = require('./webpack.rules');
|
||||
const plugins = require('./webpack.plugins');
|
||||
|
||||
rules.push({
|
||||
test: /\.css$/,
|
||||
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
rules,
|
||||
},
|
||||
plugins: plugins,
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css'],
|
||||
modules: [path.resolve(__dirname, "node_modules"), "node_modules"]
|
||||
},
|
||||
};
|
||||
27
webpack.rules.js
Normal file
27
webpack.rules.js
Normal file
@@ -0,0 +1,27 @@
|
||||
module.exports = [
|
||||
// Add support for native node modules
|
||||
{
|
||||
test: /\.node$/,
|
||||
use: 'node-loader',
|
||||
},
|
||||
{
|
||||
test: /\.(m?js|node)$/,
|
||||
parser: { amd: false },
|
||||
use: {
|
||||
loader: '@vercel/webpack-asset-relocator-loader',
|
||||
options: {
|
||||
outputAssetBase: 'native_modules',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
exclude: /(node_modules|\.webpack)/,
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
transpileOnly: true
|
||||
}
|
||||
}
|
||||
},
|
||||
];
|
||||
17
workspaces/angular-app/.browserslistrc
Normal file
17
workspaces/angular-app/.browserslistrc
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
||||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
|
||||
45
workspaces/angular-app/.gitignore
vendored
Normal file
45
workspaces/angular-app/.gitignore
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
27
workspaces/angular-app/README.md
Normal file
27
workspaces/angular-app/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# AngularApp
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.1.2.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
||||
111
workspaces/angular-app/angular.json
Normal file
111
workspaces/angular-app/angular.json
Normal file
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"angular-app": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
},
|
||||
"@schematics/angular:application": {
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "./dist",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kb",
|
||||
"maximumError": "1mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "angular-app:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "angular-app:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "angular-app:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "angular-app"
|
||||
}
|
||||
@@ -9,16 +9,28 @@ module.exports = function (config) {
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/electron-angular-quick-start'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/angular-app'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
31024
workspaces/angular-app/package-lock.json
generated
Normal file
31024
workspaces/angular-app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
37
workspaces/angular-app/package.json
Normal file
37
workspaces/angular-app/package.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "angular-app",
|
||||
"version": "1.0.2",
|
||||
"scripts": {
|
||||
"start": "ng serve",
|
||||
"package": "ng build --configuration production --base-href ./"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~12.1.2",
|
||||
"@angular/common": "~12.1.2",
|
||||
"@angular/compiler": "~12.1.2",
|
||||
"@angular/core": "~12.1.2",
|
||||
"@angular/forms": "~12.1.2",
|
||||
"@angular/platform-browser": "~12.1.2",
|
||||
"@angular/platform-browser-dynamic": "~12.1.2",
|
||||
"@angular/router": "~12.1.2",
|
||||
"@ngx-translate/core": "^13.0.0",
|
||||
"@ngx-translate/http-loader": "^6.0.0",
|
||||
"electron": "^13.1.7",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.2.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.1.2",
|
||||
"@angular/cli": "~12.1.2",
|
||||
"@angular/compiler-cli": "~12.1.2",
|
||||
"@types/node": "^12.11.1",
|
||||
"karma": "~6.3.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.0.3",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "~1.7.0",
|
||||
"typescript": "~4.3.2"
|
||||
}
|
||||
}
|
||||
16
workspaces/angular-app/src/app/app-routing.module.ts
Normal file
16
workspaces/angular-app/src/app/app-routing.module.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { MutiplesComponent } from './components/mutiples/mutiples.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MutiplesComponent,
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
@@ -52,11 +52,17 @@
|
||||
}
|
||||
|
||||
.toolbar #twitter-logo {
|
||||
height: 40px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
.toolbar #youtube-logo {
|
||||
height: 40px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.toolbar #twitter-logo:hover {
|
||||
.toolbar #twitter-logo:hover,
|
||||
.toolbar #youtube-logo:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@@ -90,6 +96,7 @@
|
||||
}
|
||||
|
||||
.card {
|
||||
all: unset;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #eee;
|
||||
background-color: #fafafa;
|
||||
@@ -243,7 +250,6 @@
|
||||
background-image: linear-gradient(-180deg,#fafbfc,#eff3f6 90%);
|
||||
margin-left: 4px;
|
||||
font-weight: 600;
|
||||
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
|
||||
}
|
||||
|
||||
.github-star-badge:hover {
|
||||
@@ -266,10 +272,8 @@
|
||||
width: 1920px;
|
||||
}
|
||||
|
||||
|
||||
/* Responsive Styles */
|
||||
@media screen and (max-width: 767px) {
|
||||
|
||||
.card-container > *:not(.circle-link) ,
|
||||
.terminal {
|
||||
width: 100%;
|
||||
@@ -313,6 +317,12 @@
|
||||
<path d="M153.62,301.59c94.34,0,145.94-78.16,145.94-145.94,0-2.22,0-4.43-.15-6.63A104.36,104.36,0,0,0,325,122.47a102.38,102.38,0,0,1-29.46,8.07,51.47,51.47,0,0,0,22.55-28.37,102.79,102.79,0,0,1-32.57,12.45,51.34,51.34,0,0,0-87.41,46.78A145.62,145.62,0,0,1,92.4,107.81a51.33,51.33,0,0,0,15.88,68.47A50.91,50.91,0,0,1,85,169.86c0,.21,0,.43,0,.65a51.31,51.31,0,0,0,41.15,50.28,51.21,51.21,0,0,1-23.16.88,51.35,51.35,0,0,0,47.92,35.62,102.92,102.92,0,0,1-63.7,22A104.41,104.41,0,0,1,75,278.55a145.21,145.21,0,0,0,78.62,23" fill="#fff"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a aria-label="Angular on YouTube" target="_blank" rel="noopener" href="https://youtube.com/angular" title="YouTube">
|
||||
<svg id="youtube-logo" height="24" width="24" data-name="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#fff">
|
||||
<path d="M0 0h24v24H0V0z" fill="none"/>
|
||||
<path d="M21.58 7.19c-.23-.86-.91-1.54-1.77-1.77C18.25 5 12 5 12 5s-6.25 0-7.81.42c-.86.23-1.54.91-1.77 1.77C2 8.75 2 12 2 12s0 3.25.42 4.81c.23.86.91 1.54 1.77 1.77C5.75 19 12 19 12 19s6.25 0 7.81-.42c.86-.23 1.54-.91 1.77-1.77C22 15.25 22 12 22 12s0-3.25-.42-4.81zM10 15V9l5.2 3-5.2 3z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="content" role="main">
|
||||
@@ -320,7 +330,8 @@
|
||||
<!-- Highlight Card -->
|
||||
<div class="card highlight-card card-small">
|
||||
|
||||
<svg id="rocket" alt="Rocket Ship" xmlns="http://www.w3.org/2000/svg" width="101.678" height="101.678" viewBox="0 0 101.678 101.678">
|
||||
<svg id="rocket" xmlns="http://www.w3.org/2000/svg" width="101.678" height="101.678" viewBox="0 0 101.678 101.678">
|
||||
<title>Rocket Ship</title>
|
||||
<g id="Group_83" data-name="Group 83" transform="translate(-141 -696)">
|
||||
<circle id="Ellipse_8" data-name="Ellipse 8" cx="50.839" cy="50.839" r="50.839" transform="translate(141 696)" fill="#dd0031"/>
|
||||
<g id="Group_47" data-name="Group 47" transform="translate(165.185 720.185)">
|
||||
@@ -332,7 +343,8 @@
|
||||
|
||||
<span>{{ title }} app is running!</span>
|
||||
|
||||
<svg id="rocket-smoke" alt="Rocket Ship Smoke" xmlns="http://www.w3.org/2000/svg" width="516.119" height="1083.632" viewBox="0 0 516.119 1083.632">
|
||||
<svg id="rocket-smoke" xmlns="http://www.w3.org/2000/svg" width="516.119" height="1083.632" viewBox="0 0 516.119 1083.632">
|
||||
<title>Rocket Ship Smoke</title>
|
||||
<path id="Path_40" data-name="Path 40" d="M644.6,141S143.02,215.537,147.049,870.207s342.774,201.755,342.774,201.755S404.659,847.213,388.815,762.2c-27.116-145.51-11.551-384.124,271.9-609.1C671.15,139.365,644.6,141,644.6,141Z" transform="translate(-147.025 -140.939)" fill="#f5f5f5"/>
|
||||
</svg>
|
||||
|
||||
@@ -345,24 +357,24 @@
|
||||
<div class="card-container">
|
||||
<a class="card" target="_blank" rel="noopener" href="https://angular.io/tutorial">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/></svg>
|
||||
|
||||
<span>Learn Angular</span>
|
||||
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg> </a>
|
||||
|
||||
<a class="card" target="_blank" rel="noopener" href="https://angular.io/cli">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/></svg>
|
||||
|
||||
<span>CLI Documentation</span>
|
||||
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
|
||||
</a>
|
||||
|
||||
<a class="card" target="_blank" rel="noopener" href="https://blog.angular.io/">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></svg>
|
||||
|
||||
<span>Angular Blog</span>
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
|
||||
</a>
|
||||
|
||||
<a class="card" target="_blank" rel="noopener" href="https://angular.io/devtools/">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M14.73,13.31C15.52,12.24,16,10.93,16,9.5C16,5.91,13.09,3,9.5,3S3,5.91,3,9.5C3,13.09,5.91,16,9.5,16 c1.43,0,2.74-0.48,3.81-1.27L19.59,21L21,19.59L14.73,13.31z M9.5,14C7.01,14,5,11.99,5,9.5S7.01,5,9.5,5S14,7.01,14,9.5 S11.99,14,9.5,14z"/><polygon points="10.29,8.44 9.5,6 8.71,8.44 6.25,8.44 8.26,10.03 7.49,12.5 9.5,10.97 11.51,12.5 10.74,10.03 12.75,8.44"/></g></g></svg>
|
||||
<span>Angular DevTools</span>
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
|
||||
</a>
|
||||
|
||||
@@ -375,41 +387,35 @@
|
||||
<input type="hidden" #selection>
|
||||
|
||||
<div class="card-container">
|
||||
<div class="card card-small" (click)="selection.value = 'component'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
|
||||
<button class="card card-small" (click)="selection.value = 'component'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
<span>New Component</span>
|
||||
</div>
|
||||
|
||||
<div class="card card-small" (click)="selection.value = 'material'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
</button>
|
||||
|
||||
<button class="card card-small" (click)="selection.value = 'material'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
<span>Angular Material</span>
|
||||
</div>
|
||||
|
||||
<div class="card card-small" (click)="selection.value = 'pwa'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
</button>
|
||||
|
||||
<button class="card card-small" (click)="selection.value = 'pwa'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
<span>Add PWA Support</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="card card-small" (click)="selection.value = 'dependency'" tabindex="0">
|
||||
<button class="card card-small" (click)="selection.value = 'dependency'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
|
||||
<span>Add Dependency</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="card card-small" (click)="selection.value = 'test'" tabindex="0">
|
||||
<button class="card card-small" (click)="selection.value = 'test'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
|
||||
<span>Run and Watch Tests</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="card card-small" (click)="selection.value = 'build'" tabindex="0">
|
||||
<button class="card card-small" (click)="selection.value = 'build'" tabindex="0">
|
||||
<svg class="material-icons" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
|
||||
|
||||
<span>Build for Production</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Terminal -->
|
||||
@@ -419,7 +425,7 @@
|
||||
<pre *ngSwitchCase="'pwa'">ng add @angular/pwa</pre>
|
||||
<pre *ngSwitchCase="'dependency'">ng add _____</pre>
|
||||
<pre *ngSwitchCase="'test'">ng test</pre>
|
||||
<pre *ngSwitchCase="'build'">ng build --prod</pre>
|
||||
<pre *ngSwitchCase="'build'">ng build</pre>
|
||||
</div>
|
||||
|
||||
<!-- Links -->
|
||||
@@ -435,7 +441,8 @@
|
||||
</a>
|
||||
|
||||
<a class="circle-link" title="CLI" href="https://cli.angular.io/" target="_blank" rel="noopener">
|
||||
<svg alt="Angular CLI Logo" xmlns="http://www.w3.org/2000/svg" width="21.762" height="23.447" viewBox="0 0 21.762 23.447">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="21.762" height="23.447" viewBox="0 0 21.762 23.447">
|
||||
<title>Angular CLI Logo</title>
|
||||
<g id="Group_21" data-name="Group 21" transform="translate(0)">
|
||||
<path id="Path_20" data-name="Path 20" d="M2660.313,313.618h0l-10.833,3.9,1.637,14.4,9.2,5.152,9.244-5.152,1.685-14.4Z" transform="translate(-2649.48 -313.618)" fill="#37474f"/>
|
||||
<path id="Path_21" data-name="Path 21" d="M2741.883,313.618v23.447l9.244-5.152,1.685-14.4Z" transform="translate(-2731.05 -313.618)" fill="#263238"/>
|
||||
@@ -446,57 +453,18 @@
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a class="circle-link" title="Augury" href="https://augury.rangle.io/" target="_blank" rel="noopener">
|
||||
<svg alt="Angular Augury Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="21.81" height="23.447" viewBox="0 0 21.81 23.447">
|
||||
<defs>
|
||||
<clipPath id="clip-path">
|
||||
<rect id="Rectangle_13" data-name="Rectangle 13" width="10.338" height="10.27" fill="none"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="Group_25" data-name="Group 25" transform="translate(0)">
|
||||
<path id="Path_24" data-name="Path 24" d="M3780.155,311.417h0l-10.881,3.9,1.637,14.4,9.244,5.152,9.244-5.152,1.685-14.4Z" transform="translate(-3769.274 -311.417)" fill="#4a3493"/>
|
||||
<path id="Path_25" data-name="Path 25" d="M3862.088,311.417v23.447l9.244-5.152,1.685-14.4Z" transform="translate(-3851.207 -311.417)" fill="#311b92"/>
|
||||
<g id="Group_24" data-name="Group 24" transform="translate(6.194 6.73)" opacity="0.5">
|
||||
<g id="Group_23" data-name="Group 23" transform="translate(0 0)">
|
||||
<g id="Group_22" data-name="Group 22" clip-path="url(#clip-path)">
|
||||
<path id="Path_26" data-name="Path 26" d="M3832.4,373.252a5.168,5.168,0,1,1-5.828-4.383,5.216,5.216,0,0,1,2.574.3,3.017,3.017,0,1,0,3.252,4.086Z" transform="translate(-3822.107 -368.821)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<path id="Path_27" data-name="Path 27" d="M3830.582,370.848a5.162,5.162,0,1,1-3.254-4.086,3.017,3.017,0,1,0,3.252,4.086Z" transform="translate(-3814.311 -359.969)" fill="#fff"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a class="circle-link" title="Protractor" href="https://www.protractortest.org/" target="_blank" rel="noopener">
|
||||
<svg alt="Angular Protractor Logo" xmlns="http://www.w3.org/2000/svg" width="21.81" height="23.447" viewBox="0 0 21.81 23.447">
|
||||
<g id="Group_26" data-name="Group 26" transform="translate(0)">
|
||||
<path id="Path_28" data-name="Path 28" d="M4620.155,311.417h0l-10.881,3.9,1.637,14.4,9.244,5.152,9.244-5.152,1.685-14.4Z" transform="translate(-4609.274 -311.417)" fill="#e13439"/>
|
||||
<path id="Path_29" data-name="Path 29" d="M4702.088,311.417v23.447l9.244-5.152,1.685-14.4Z" transform="translate(-4691.207 -311.417)" fill="#b52f32"/>
|
||||
<path id="Path_30" data-name="Path 30" d="M4651.044,369.58v-.421h1.483a7.6,7.6,0,0,0-2.106-5.052l-1.123,1.123-.3-.3,1.122-1.121a7.588,7.588,0,0,0-4.946-2.055v1.482h-.421v-1.485a7.589,7.589,0,0,0-5.051,2.058l1.122,1.121-.3.3-1.123-1.123a7.591,7.591,0,0,0-2.106,5.052h1.482v.421h-1.489v1.734h15.241V369.58Zm-10.966-.263a4.835,4.835,0,0,1,9.67,0Z" transform="translate(-4634.008 -355.852)" fill="#fff"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a class="circle-link" title="Find a Local Meetup" href="https://www.meetup.com/find/?keywords=angular" target="_blank" rel="noopener">
|
||||
<svg alt="Meetup Logo" xmlns="http://www.w3.org/2000/svg" width="24.607" height="23.447" viewBox="0 0 24.607 23.447">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24.607" height="23.447" viewBox="0 0 24.607 23.447">
|
||||
<title>Meetup Logo</title>
|
||||
<path id="logo--mSwarm" d="M21.221,14.95A4.393,4.393,0,0,1,17.6,19.281a4.452,4.452,0,0,1-.8.069c-.09,0-.125.035-.154.117a2.939,2.939,0,0,1-2.506,2.091,2.868,2.868,0,0,1-2.248-.624.168.168,0,0,0-.245-.005,3.926,3.926,0,0,1-2.589.741,4.015,4.015,0,0,1-3.7-3.347,2.7,2.7,0,0,1-.043-.38c0-.106-.042-.146-.143-.166a3.524,3.524,0,0,1-1.516-.69A3.623,3.623,0,0,1,2.23,14.557a3.66,3.66,0,0,1,1.077-3.085.138.138,0,0,0,.026-.2,3.348,3.348,0,0,1-.451-1.821,3.46,3.46,0,0,1,2.749-3.28.44.44,0,0,0,.355-.281,5.072,5.072,0,0,1,3.863-3,5.028,5.028,0,0,1,3.555.666.31.31,0,0,0,.271.03A4.5,4.5,0,0,1,18.3,4.7a4.4,4.4,0,0,1,1.334,2.751,3.658,3.658,0,0,1,.022.706.131.131,0,0,0,.1.157,2.432,2.432,0,0,1,1.574,1.645,2.464,2.464,0,0,1-.7,2.616c-.065.064-.051.1-.014.166A4.321,4.321,0,0,1,21.221,14.95ZM13.4,14.607a2.09,2.09,0,0,0,1.409,1.982,4.7,4.7,0,0,0,1.275.221,1.807,1.807,0,0,0,.9-.151.542.542,0,0,0,.321-.545.558.558,0,0,0-.359-.534,1.2,1.2,0,0,0-.254-.078c-.262-.047-.526-.086-.787-.138a.674.674,0,0,1-.617-.75,3.394,3.394,0,0,1,.218-1.109c.217-.658.509-1.286.79-1.918a15.609,15.609,0,0,0,.745-1.86,1.95,1.95,0,0,0,.06-1.073,1.286,1.286,0,0,0-1.051-1.033,1.977,1.977,0,0,0-1.521.2.339.339,0,0,1-.446-.042c-.1-.092-.2-.189-.307-.284a1.214,1.214,0,0,0-1.643-.061,7.563,7.563,0,0,1-.614.512A.588.588,0,0,1,10.883,8c-.215-.115-.437-.215-.659-.316a2.153,2.153,0,0,0-.695-.248A2.091,2.091,0,0,0,7.541,8.562a9.915,9.915,0,0,0-.405.986c-.559,1.545-1.015,3.123-1.487,4.7a1.528,1.528,0,0,0,.634,1.777,1.755,1.755,0,0,0,1.5.211,1.35,1.35,0,0,0,.824-.858c.543-1.281,1.032-2.584,1.55-3.875.142-.355.28-.712.432-1.064a.548.548,0,0,1,.851-.24.622.622,0,0,1,.185.539,2.161,2.161,0,0,1-.181.621c-.337.852-.68,1.7-1.018,2.552a2.564,2.564,0,0,0-.173.528.624.624,0,0,0,.333.71,1.073,1.073,0,0,0,.814.034,1.22,1.22,0,0,0,.657-.655q.758-1.488,1.511-2.978.35-.687.709-1.37a1.073,1.073,0,0,1,.357-.434.43.43,0,0,1,.463-.016.373.373,0,0,1,.153.387.7.7,0,0,1-.057.236c-.065.157-.127.316-.2.469-.42.883-.846,1.763-1.262,2.648A2.463,2.463,0,0,0,13.4,14.607Zm5.888,6.508a1.09,1.09,0,0,0-2.179.006,1.09,1.09,0,0,0,2.179-.006ZM1.028,12.139a1.038,1.038,0,1,0,.01-2.075,1.038,1.038,0,0,0-.01,2.075ZM13.782.528a1.027,1.027,0,1,0-.011,2.055A1.027,1.027,0,0,0,13.782.528ZM22.21,6.95a.882.882,0,0,0-1.763.011A.882.882,0,0,0,22.21,6.95ZM4.153,4.439a.785.785,0,1,0,.787-.78A.766.766,0,0,0,4.153,4.439Zm8.221,18.22a.676.676,0,1,0-.677.666A.671.671,0,0,0,12.374,22.658ZM22.872,12.2a.674.674,0,0,0-.665.665.656.656,0,0,0,.655.643.634.634,0,0,0,.655-.644A.654.654,0,0,0,22.872,12.2ZM7.171-.123A.546.546,0,0,0,6.613.43a.553.553,0,1,0,1.106,0A.539.539,0,0,0,7.171-.123ZM24.119,9.234a.507.507,0,0,0-.493.488.494.494,0,0,0,.494.494.48.48,0,0,0,.487-.483A.491.491,0,0,0,24.119,9.234Zm-19.454,9.7a.5.5,0,0,0-.488-.488.491.491,0,0,0-.487.5.483.483,0,0,0,.491.479A.49.49,0,0,0,4.665,18.936Z" transform="translate(0 0.123)" fill="#f64060"/>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a class="circle-link" title="Join the Conversation on Gitter" href="https://gitter.im/angular/angular" target="_blank" rel="noopener">
|
||||
<svg alt="Gitter Logo" xmlns="http://www.w3.org/2000/svg" width="19.447" height="19.447" viewBox="0 0 19.447 19.447">
|
||||
<g id="Group_40" data-name="Group 40" transform="translate(-1612 -405)">
|
||||
<rect id="Rectangle_19" data-name="Rectangle 19" width="19.447" height="19.447" transform="translate(1612 405)" fill="#e60257"/>
|
||||
<g id="gitter" transform="translate(1617.795 408.636)">
|
||||
<g id="Group_33" data-name="Group 33" transform="translate(0 0)">
|
||||
<rect id="Rectangle_15" data-name="Rectangle 15" width="1.04" height="9.601" transform="translate(2.304 2.324)" fill="#fff"/>
|
||||
<rect id="Rectangle_16" data-name="Rectangle 16" width="1.04" height="9.601" transform="translate(4.607 2.324)" fill="#fff"/>
|
||||
<rect id="Rectangle_17" data-name="Rectangle 17" width="1.04" height="4.648" transform="translate(6.91 2.324)" fill="#fff"/>
|
||||
<rect id="Rectangle_18" data-name="Rectangle 18" width="1.04" height="6.971" transform="translate(0 0)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<a class="circle-link" title="Join the Conversation on Discord" href="https://discord.gg/angular" target="_blank" rel="noopener">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 245 240">
|
||||
<title>Discord Logo</title>
|
||||
<path d="M104.4 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1.1-6.1-4.5-11.1-10.2-11.1zM140.9 103.9c-5.7 0-10.2 5-10.2 11.1s4.6 11.1 10.2 11.1c5.7 0 10.2-5 10.2-11.1s-4.5-11.1-10.2-11.1z"/>
|
||||
<path d="M189.5 20h-134C44.2 20 35 29.2 35 40.6v135.2c0 11.4 9.2 20.6 20.5 20.6h113.4l-5.3-18.5 12.8 11.9 12.1 11.2 21.5 19V40.6c0-11.4-9.2-20.6-20.5-20.6zm-38.6 130.6s-3.6-4.3-6.6-8.1c13.1-3.7 18.1-11.9 18.1-11.9-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.5-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.7-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.3-1.8-1-2.8-1.7-2.8-1.7s4.8 8 17.5 11.8c-3 3.8-6.7 8.3-6.7 8.3-22.1-.7-30.5-15.2-30.5-15.2 0-32.2 14.4-58.3 14.4-58.3 14.4-10.8 28.1-10.5 28.1-10.5l1 1.2c-18 5.2-26.3 13.1-26.3 13.1s2.2-1.2 5.9-2.9c10.7-4.7 19.2-6 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.6 0 0-7.9-7.5-24.9-12.7l1.4-1.6s13.7-.3 28.1 10.5c0 0 14.4 26.1 14.4 58.3 0 0-8.5 14.5-30.6 15.2z"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
@@ -515,7 +483,8 @@
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<svg id="clouds" alt="Gray Clouds Background" xmlns="http://www.w3.org/2000/svg" width="2611.084" height="485.677" viewBox="0 0 2611.084 485.677">
|
||||
<svg id="clouds" xmlns="http://www.w3.org/2000/svg" width="2611.084" height="485.677" viewBox="0 0 2611.084 485.677">
|
||||
<title>Gray Clouds Background</title>
|
||||
<path id="Path_39" data-name="Path 39" d="M2379.709,863.793c10-93-77-171-168-149-52-114-225-105-264,15-75,3-140,59-152,133-30,2.83-66.725,9.829-93.5,26.25-26.771-16.421-63.5-23.42-93.5-26.25-12-74-77-130-152-133-39-120-212-129-264-15-54.084-13.075-106.753,9.173-138.488,48.9-31.734-39.726-84.4-61.974-138.487-48.9-52-114-225-105-264,15a162.027,162.027,0,0,0-103.147,43.044c-30.633-45.365-87.1-72.091-145.206-58.044-52-114-225-105-264,15-75,3-140,59-152,133-53,5-127,23-130,83-2,42,35,72,70,86,49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33,61.112,8.015,113.854-5.72,150.492-29.764a165.62,165.62,0,0,0,110.861-3.236c47,94,178,113,251,33,31.385,4.116,60.563,2.495,86.487-3.311,25.924,5.806,55.1,7.427,86.488,3.311,73,80,204,61,251-33a165.625,165.625,0,0,0,120,0c51,13,108,15,157-5a147.188,147.188,0,0,0,33.5-18.694,147.217,147.217,0,0,0,33.5,18.694c49,20,106,18,157,5a165.625,165.625,0,0,0,120,0c47,94,178,113,251,33C2446.709,1093.793,2554.709,922.793,2379.709,863.793Z" transform="translate(142.69 -634.312)" fill="#eee"/>
|
||||
</svg>
|
||||
|
||||
@@ -529,6 +498,4 @@
|
||||
<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * -->
|
||||
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
|
||||
|
||||
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
<router-outlet></router-outlet>
|
||||
@@ -1,10 +1,10 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
@@ -12,7 +12,7 @@ describe('AppComponent', () => {
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
@@ -20,16 +20,16 @@ describe('AppComponent', () => {
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'electron-angular-quick-start'`, () => {
|
||||
it(`should have as title 'angular-app'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('electron-angular-quick-start');
|
||||
expect(app.title).toEqual('angular-app');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement;
|
||||
expect(compiled.querySelector('.content span').textContent).toContain('electron-angular-quick-start app is running!');
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-app app is running!');
|
||||
});
|
||||
});
|
||||
@@ -3,7 +3,7 @@ import { Component } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'electron-angular-quick-start';
|
||||
@@ -2,7 +2,6 @@ import { HttpClient, HttpClientModule } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
@@ -29,7 +28,6 @@ export function HttpLoaderFactory(http: HttpClient) {
|
||||
deps: [HttpClient],
|
||||
},
|
||||
}),
|
||||
RouterModule.forRoot([{ path: '', component: MutiplesComponent }]),
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent],
|
||||
@@ -1,4 +1,4 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
import { MutiplesComponent } from './mutiples.component';
|
||||
|
||||
@@ -6,7 +6,7 @@ describe('MutiplesComponent', () => {
|
||||
let component: MutiplesComponent;
|
||||
let fixture: ComponentFixture<MutiplesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MutiplesComponent ]
|
||||
})
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ElectronIpcService } from 'angular/app/services/electron-ipc.service';
|
||||
import { WindowApiConst } from 'shared';
|
||||
import { WindowApiConst } from 'shared-lib';
|
||||
import { ElectronIpcService } from '../../services/electron-ipc.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-mutiples',
|
||||
@@ -23,7 +23,7 @@ export class MutiplesComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
// Specifying what to do with received data from main process
|
||||
this.electronIpc.receive(WindowApiConst.MULTIPLES_OUTPUT, (...data) => {
|
||||
this.electronIpc.receive(WindowApiConst.MULTIPLES_OUTPUT, (...data: []) => {
|
||||
// Update current data
|
||||
this.multiples = data;
|
||||
});
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Injectable, NgZone } from '@angular/core';
|
||||
import { WindowApi } from 'shared';
|
||||
import { WindowApi } from 'shared-lib';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ElectronIpcService {
|
||||
private _api: WindowApi;
|
||||
private _api!: WindowApi;
|
||||
|
||||
constructor(private zone: NgZone) {
|
||||
if (window && (window as any).api) {
|
||||
@@ -20,7 +20,7 @@ export class ElectronIpcService {
|
||||
}
|
||||
}
|
||||
|
||||
public receive(channel: string, func: (...data) => void): void {
|
||||
public receive(channel: string, func: (...data: any) => void): void {
|
||||
if (this._api) {
|
||||
this._api.receive(channel, (...data) => {
|
||||
console.log(`Received from main process channel [${channel}]`, data);
|
||||
@@ -35,7 +35,7 @@ export class ElectronIpcService {
|
||||
}
|
||||
}
|
||||
|
||||
public send(channel: string, ...data): void {
|
||||
public send(channel: string, ...data: any): void {
|
||||
if (this._api) {
|
||||
console.log(`Sending to main process channel [${channel}]`, data);
|
||||
this._api.send(channel, ...data);
|
||||
@@ -1,5 +1,5 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
@@ -13,4 +13,4 @@ export const environment = {
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||
|
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 948 B |
@@ -4,8 +4,8 @@
|
||||
<meta charset="utf-8" />
|
||||
<title>ElectronAngularQuickStart</title>
|
||||
<base href="/" />
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self';" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!--<meta http-equiv="Content-Security-Policy" content="script-src 'self'" />-->
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -18,7 +18,9 @@
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
/**
|
||||
* IE11 requires the following for NgClass support on SVG elements
|
||||
*/
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
@@ -55,7 +57,7 @@
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
@@ -1,6 +1,6 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
15
workspaces/angular-app/tsconfig.app.json
Normal file
15
workspaces/angular-app/tsconfig.app.json
Normal file
@@ -0,0 +1,15 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
31
workspaces/angular-app/tsconfig.json
Normal file
31
workspaces/angular-app/tsconfig.json
Normal file
@@ -0,0 +1,31 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2017",
|
||||
"module": "es2020",
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
},
|
||||
"references": [{ "path": "../shared-lib" }]
|
||||
}
|
||||
18
workspaces/angular-app/tsconfig.spec.json
Normal file
18
workspaces/angular-app/tsconfig.spec.json
Normal file
@@ -0,0 +1,18 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -24,6 +24,6 @@
|
||||
"mainLogFile": "main.log",
|
||||
"mainLogLevel": "error",
|
||||
"isIconAvailable": false,
|
||||
"isOpenDevTools": false
|
||||
"isOpenDevTools": true
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
@@ -1,12 +1,12 @@
|
||||
import { app, BrowserWindow, ipcMain, nativeImage } from 'electron';
|
||||
import * as path from 'path';
|
||||
import * as url from 'url';
|
||||
import { AbstractService } from '../services/abstract-service';
|
||||
import { MultiplesService } from '../services/multiples-service';
|
||||
import { Logger } from '../utils/logger';
|
||||
import { app, BrowserWindow, ipcMain, nativeImage } from "electron";
|
||||
import * as path from "path";
|
||||
import * as url from "url";
|
||||
import { AbstractService } from "../services/abstract-service";
|
||||
import { MultiplesService } from "../services/multiples-service";
|
||||
import { Logger } from "../utils/logger";
|
||||
|
||||
declare const global: any;
|
||||
declare const __static: string;
|
||||
declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
|
||||
|
||||
export class Window {
|
||||
private _window: BrowserWindow | any;
|
||||
@@ -21,8 +21,9 @@ export class Window {
|
||||
this._window = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
backgroundColor: '#FFFFFF',
|
||||
icon: this.loadIcon(),
|
||||
backgroundColor: "#FFFFFF",
|
||||
// FIXME
|
||||
// icon: this.loadIcon(),
|
||||
webPreferences: {
|
||||
// Default behavior in Electron since 5, that
|
||||
// limits the powers granted to remote content
|
||||
@@ -38,7 +39,7 @@ export class Window {
|
||||
// except in e2e test when that access is required by Spectron
|
||||
enableRemoteModule: global.gConfig.isEnableRemoteModule,
|
||||
// Use a preload script to enhance security
|
||||
preload: path.join(app.getAppPath(), 'preload.js'),
|
||||
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -46,11 +47,11 @@ export class Window {
|
||||
private loadIcon(): Electron.NativeImage {
|
||||
let iconObj = null;
|
||||
if (global.gConfig.isIconAvailable) {
|
||||
const iconPath = path.join(__static, 'icons/icon.png');
|
||||
Logger.debug('Icon Path', iconPath);
|
||||
const iconPath = path.join(__dirname, "icons/icon.png");
|
||||
Logger.debug("Icon Path", iconPath);
|
||||
iconObj = nativeImage.createFromPath(iconPath);
|
||||
// Change dock icon on MacOS
|
||||
if (iconObj && process.platform === 'darwin') {
|
||||
if (iconObj && process.platform === "darwin") {
|
||||
app.dock.setIcon(iconObj);
|
||||
}
|
||||
}
|
||||
@@ -58,14 +59,14 @@ export class Window {
|
||||
}
|
||||
|
||||
private loadRenderer(): void {
|
||||
if (global.gConfig.config_id === 'development') {
|
||||
if (global.gConfig.config_id === "development") {
|
||||
// Dev mode, take advantage of the live reload by loading local URL
|
||||
this.window.loadURL(`http://localhost:4200`);
|
||||
} else {
|
||||
// Else mode, we simply load angular bundle
|
||||
const indexPath = url.format({
|
||||
pathname: path.join(__dirname, `index.html`),
|
||||
protocol: 'file:',
|
||||
pathname: path.join(__dirname, `../renderer/angular_window/index.html`),
|
||||
protocol: "file:",
|
||||
slashes: true,
|
||||
});
|
||||
this.window.loadURL(indexPath);
|
||||
@@ -76,7 +77,7 @@ export class Window {
|
||||
}
|
||||
|
||||
// When the window is closed`
|
||||
this._window.on('closed', () => {
|
||||
this._window.on("closed", () => {
|
||||
// Remove IPC Main listeners
|
||||
ipcMain.removeAllListeners();
|
||||
// Delete current reference
|
||||
@@ -86,7 +87,7 @@ export class Window {
|
||||
|
||||
private openDevTools(): void {
|
||||
this._window.webContents.openDevTools();
|
||||
this._window.webContents.on('devtools-opened', () => {
|
||||
this._window.webContents.on("devtools-opened", () => {
|
||||
this._window.focus();
|
||||
setImmediate(() => {
|
||||
this._window.focus();
|
||||
19
workspaces/electron-app/main/index.ts
Normal file
19
workspaces/electron-app/main/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import * as fs from "fs-extra";
|
||||
import * as _ from "lodash";
|
||||
import * as path from "path";
|
||||
import { App } from "./components/app";
|
||||
|
||||
declare const global: any;
|
||||
|
||||
// Load config
|
||||
const currentEnv = process.env.X_NODE_ENV || process.env.NODE_ENV;
|
||||
const appConfig =
|
||||
currentEnv === "development"
|
||||
? fs.readJsonSync(path.join(__dirname, "config.json"))
|
||||
: fs.readJsonSync(path.join(__dirname, "config.json"));
|
||||
const defaultConf = appConfig.development;
|
||||
const currentConf = appConfig[currentEnv];
|
||||
global.gConfig = _.merge(defaultConf, currentConf);
|
||||
|
||||
// Launch app
|
||||
App.launch();
|
||||
@@ -1,5 +1,5 @@
|
||||
import { WindowApiConst } from 'shared';
|
||||
import { AbstractService } from './abstract-service';
|
||||
import { WindowApiConst } from "shared-lib";
|
||||
import { AbstractService } from "./abstract-service";
|
||||
|
||||
export class MultiplesService extends AbstractService {
|
||||
receptionChannel(): string {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { app } from 'electron';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as winston from 'winston';
|
||||
import { app } from "electron";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
import * as winston from "winston";
|
||||
|
||||
declare const global: any;
|
||||
|
||||
@@ -52,9 +52,9 @@ export class Logger {
|
||||
|
||||
private constructor() {
|
||||
this._logger = winston.createLogger({
|
||||
level: 'debug',
|
||||
level: "debug",
|
||||
format: winston.format.json(),
|
||||
defaultMeta: { service: 'user-service' },
|
||||
defaultMeta: { service: "user-service" },
|
||||
transports: [
|
||||
new winston.transports.File({
|
||||
filename: this.getLogFilename(),
|
||||
@@ -69,10 +69,10 @@ export class Logger {
|
||||
|
||||
// If we're not in production then log also to the `console` with the format:
|
||||
// `${info.timestamp} ${info.level}: ${info.message} JSON.stringify({ ...rest }) `
|
||||
if (global.gConfig.config_id === 'development') {
|
||||
if (global.gConfig.config_id === "development") {
|
||||
this._logger.add(
|
||||
new winston.transports.Console({
|
||||
stderrLevels: ['error', 'warn'],
|
||||
stderrLevels: ["error", "warn"],
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
this.consoleFormat
|
||||
@@ -88,13 +88,13 @@ export class Logger {
|
||||
*/
|
||||
private getLogFilename() {
|
||||
let filename = global.gConfig.mainLogFile;
|
||||
if (global.gConfig.config_id === 'production') {
|
||||
if (global.gConfig.config_id === "production") {
|
||||
const appName = app.getName();
|
||||
if (process.platform == 'linux') {
|
||||
if (process.platform == "linux") {
|
||||
filename = `.config/${appName}/${filename}`;
|
||||
} else if (process.platform == 'darwin') {
|
||||
} else if (process.platform == "darwin") {
|
||||
filename = `Library/Logs/${appName}/${filename}`;
|
||||
} else if (process.platform == 'win32') {
|
||||
} else if (process.platform == "win32") {
|
||||
filename = `AppData\\Roaming\\${appName}\\${filename}`;
|
||||
}
|
||||
}
|
||||
3
workspaces/electron-app/renderer/README.md
Normal file
3
workspaces/electron-app/renderer/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
preload.ts is the only file that matters in this directory.
|
||||
|
||||
The others files are not needed at all, but they are required for electron forge webpack config.
|
||||
6
workspaces/electron-app/renderer/index.css
Normal file
6
workspaces/electron-app/renderer/index.css
Normal file
@@ -0,0 +1,6 @@
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
margin: auto;
|
||||
max-width: 38rem;
|
||||
padding: 2rem;
|
||||
}
|
||||
12
workspaces/electron-app/renderer/index.html
Normal file
12
workspaces/electron-app/renderer/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Hello World!</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>💖 Hello World!</h1>
|
||||
<p>Welcome to your Electron application.</p>
|
||||
</body>
|
||||
</html>
|
||||
31
workspaces/electron-app/renderer/index.ts
Normal file
31
workspaces/electron-app/renderer/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* This file will automatically be loaded by webpack and run in the "renderer" context.
|
||||
* To learn more about the differences between the "main" and the "renderer" context in
|
||||
* Electron, visit:
|
||||
*
|
||||
* https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
|
||||
*
|
||||
* By default, Node.js integration in this file is disabled. When enabling Node.js integration
|
||||
* in a renderer process, please be aware of potential security implications. You can read
|
||||
* more about security risks here:
|
||||
*
|
||||
* https://electronjs.org/docs/tutorial/security
|
||||
*
|
||||
* To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`
|
||||
* flag:
|
||||
*
|
||||
* ```
|
||||
* // Create the browser window.
|
||||
* mainWindow = new BrowserWindow({
|
||||
* width: 800,
|
||||
* height: 600,
|
||||
* webPreferences: {
|
||||
* nodeIntegration: true
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
|
||||
import './index.css';
|
||||
|
||||
console.log('👋 This message is being logged by "renderer.js", included via webpack');
|
||||
@@ -1,7 +1,7 @@
|
||||
// To secure user platform when running renderer process stuff,
|
||||
// Node.JS and Electron APIs are only available in this script
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
import { WindowApi, WindowApiConst } from 'shared';
|
||||
import { contextBridge, ipcRenderer } from "electron";
|
||||
import { WindowApi, WindowApiConst } from "shared-lib";
|
||||
|
||||
// So we expose protected methods that allow the renderer process
|
||||
// to use the ipcRenderer without exposing the entire object
|
||||
@@ -20,13 +20,13 @@ const windowApi: WindowApi = {
|
||||
};
|
||||
|
||||
declare const window: any;
|
||||
if (process.env.X_NODE_ENV === 'e2e-test') {
|
||||
if (process.env.X_NODE_ENV === "e2e-test") {
|
||||
// Injecting windowApi directly
|
||||
window.api = windowApi;
|
||||
} else {
|
||||
// ContextBridge API can only be used when contextIsolation is enabled
|
||||
// which is normally the case except in e2e test mode
|
||||
contextBridge.exposeInMainWorld('api', windowApi);
|
||||
contextBridge.exposeInMainWorld("api", windowApi);
|
||||
}
|
||||
|
||||
console.log('The preload script has been injected successfully.');
|
||||
console.log("The preload script has been injected successfully.");
|
||||
4
workspaces/electron-app/tsconfig.json
Normal file
4
workspaces/electron-app/tsconfig.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"references": [{ "path": "../shared-lib" }]
|
||||
}
|
||||
@@ -5,7 +5,7 @@ const jasmine = new Jasmine();
|
||||
jasmine.loadConfig({
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 15000,
|
||||
spec_dir: "e2e/electron",
|
||||
spec_dir: "workspaces/electron-e2e",
|
||||
spec_files: ["./**/*-spec.ts"],
|
||||
helpers: ["./**/*-helper.ts"],
|
||||
random: false,
|
||||
@@ -18,5 +18,5 @@ require("ts-node").register({
|
||||
project: require("path").join(__dirname, "./tsconfig.json"),
|
||||
});
|
||||
jasmine.env.clearReporters();
|
||||
jasmine.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
jasmine.addReporter(new SpecReporter({ spec: { displayStacktrace: 'pretty' } }));
|
||||
jasmine.execute();
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as path from 'path';
|
||||
import { Application } from 'spectron';
|
||||
import * as path from "path";
|
||||
import { Application } from "spectron";
|
||||
|
||||
describe('A simple test to verify a visible window is opened with a title', () => {
|
||||
describe("A simple test to verify a visible window is opened with a title", () => {
|
||||
// Init local app
|
||||
let app = new Application({
|
||||
path: path.join(__dirname, '../../../node_modules/.bin/electron'),
|
||||
args: [path.join(__dirname, '../../../dist/build/main.js')],
|
||||
path: path.join(__dirname, "../../../node_modules/.bin/electron"),
|
||||
args: [path.join(__dirname, "../../../.webpack/main/index.js")],
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -22,14 +22,14 @@ describe('A simple test to verify a visible window is opened with a title', () =
|
||||
}
|
||||
});
|
||||
|
||||
it('shows an initial window', async () => {
|
||||
it("shows an initial window", async () => {
|
||||
// Checking there is one visible window
|
||||
expect(await app.browserWindow.isVisible()).toEqual(true);
|
||||
// Please note that getWindowCount() will return 2 if `dev tools` are opened.
|
||||
expect(await app.client.getWindowCount()).toEqual(1);
|
||||
});
|
||||
|
||||
it('should have expected title', async () => {
|
||||
expect(await app.client.getTitle()).toEqual('ElectronAngularQuickStart');
|
||||
it("should have expected title", async () => {
|
||||
expect(await app.client.getTitle()).toEqual("ElectronAngularQuickStart");
|
||||
});
|
||||
});
|
||||
@@ -4,6 +4,7 @@
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"noEmit": true,
|
||||
"types": ["jasmine", "jasminewd2", "node"]
|
||||
}
|
||||
}
|
||||
2
workspaces/shared-lib/.gitignore
vendored
Normal file
2
workspaces/shared-lib/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Generated JS files
|
||||
dist
|
||||
@@ -1,9 +1,9 @@
|
||||
export class WindowApiConst {
|
||||
/** Channel used by the renderer process to send data to the main process */
|
||||
public static readonly MULTIPLES_INPUT = 'getMultiplesInput';
|
||||
public static readonly MULTIPLES_INPUT = "getMultiplesInput";
|
||||
|
||||
/** Channel used by the renderer process to receive data from the main process */
|
||||
public static readonly MULTIPLES_OUTPUT = 'getMultiplesOutput';
|
||||
public static readonly MULTIPLES_OUTPUT = "getMultiplesOutput";
|
||||
|
||||
/** Whitelist of the safe channels to use when sending data to the main process */
|
||||
public static readonly SENDING_SAFE_CHANNELS = [
|
||||
9
workspaces/shared-lib/package.json
Normal file
9
workspaces/shared-lib/package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "shared-lib",
|
||||
"version": "1.0.2",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
},
|
||||
"author": "Sourcygen",
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": true,
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"outDir": "../../dist/node_modules/shared"
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["./**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user