Commit a6ef8121 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

updated package configuration for electron

Showing with 19 additions and 16 deletions
+19 -16
appId: fr.irstea.cassiopee appId: fr.irstea.cassiopee
productName: Cassiopee productName: Cassiopée
directories: directories:
output: release output: release
...@@ -43,6 +43,6 @@ deb: ...@@ -43,6 +43,6 @@ deb:
win: win:
target: target:
- portable
- nsis - nsis
#- portable
# icon: "src/app/assets/… # icon: "src/app/assets/…
...@@ -12,10 +12,10 @@ function createWindow () { ...@@ -12,10 +12,10 @@ function createWindow () {
win.setMenuBarVisibility(false) win.setMenuBarVisibility(false)
// Open the DevTools. // Open the DevTools.
win.webContents.openDevTools(); // win.webContents.openDevTools();
// Open external doc links in specific window // Open external doc links in specific window
win.webContents.on('new-window', (event, url, frameName, disposition, options) => { /* win.webContents.on('new-window', (event, url, frameName, disposition, options) => {
event.preventDefault(); event.preventDefault();
// win.src = url; // win.src = url;
const win2 = new BrowserWindow({ const win2 = new BrowserWindow({
...@@ -28,7 +28,7 @@ function createWindow () { ...@@ -28,7 +28,7 @@ function createWindow () {
win2.loadURL(url); // existing webContents will be navigated automatically win2.loadURL(url); // existing webContents will be navigated automatically
} }
event.newGuest = win2; event.newGuest = win2;
}); }); */
// Close the app. // Close the app.
win.on('close', () => { win.on('close', () => {
......
{ {
"name": "nghyd", "name": "cassiopee",
"description": "Hydraulic calculators", "description": "Hydraulic calculators",
"author": "Irstea", "author": "Irstea",
"version": "4.1.0", "version": "4.1.0",
...@@ -7,19 +7,22 @@ ...@@ -7,19 +7,22 @@
"homepage": "http://cassiopee.g-eau.net", "homepage": "http://cassiopee.g-eau.net",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"start": "npm run preprocess; ng serve --host 0.0.0.0", "ng": "ng",
"prod": "npm run preprocess; ng serve --host 0.0.0.0 --prod", "start": "npm run preprocess && ng serve --host 0.0.0.0",
"build": "npm run preprocess; ng build --prod --build-optimizer=false", "prod": "npm run preprocess && ng serve --host 0.0.0.0 --prod",
"build": "npm run preprocess && ng build --prod --build-optimizer=false",
"electron": "electron .",
"electron-builder": "electron-builder",
"release-clean": "rm -r release/*", "release-clean": "rm -r release/*",
"release-linux": "npm run release-clean && npm run build && electron-builder", "release-linux": "npm run release-clean & npm run build && electron-builder",
"release-windows": "rd /s /q release & ng build --prod --build-optimizer=false && electron-builder", "release-windows": "rd /s /q release & ng build --prod --build-optimizer=false && npm run electron-builder",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
"e2equick": "ng e2e --dev-server-target= --baseUrl=http://localhost:4200", "e2equick": "ng e2e --dev-server-target= --baseUrl=http://localhost:4200",
"jalhyd": "rm node_modules/jalhyd; cd ../jalhyd; npm run build; cd ../nghyd; npm install ../jalhyd;", "jalhyd": "rm node_modules/jalhyd && cd ../jalhyd && npm run build && cd ../nghyd && npm install ../jalhyd",
"mathjax": "rsync -az --delete node_modules/mathjax docs-fr/javascripts;", "mathjax": "rsync -az --delete node_modules/mathjax docs-fr/javascripts",
"mkdocs": "npm run mathjax; find docs-fr/javascripts/ -name '*.md' -type f -delete; python3 -m mkdocs build", "mkdocs": "npm run mathjax && find docs-fr/javascripts/ -name '*.md' -type f -delete && python3 -m mkdocs build",
"preprocess": "node preprocessors.js; npm run mkdocs;", "preprocess": "node preprocessors.js && npm run mkdocs",
"viz": "tsviz -recursive src/ nghyd_class_diagram.png", "viz": "tsviz -recursive src/ nghyd_class_diagram.png",
"compodoc-patch": "sed -i '/Application.prototype.detectAngularJSProjects = function () {/a return false; // patch cracra, voir https://github.com/compodoc/compodoc/issues/667' node_modules/@compodoc/compodoc/dist/index-cli.js", "compodoc-patch": "sed -i '/Application.prototype.detectAngularJSProjects = function () {/a return false; // patch cracra, voir https://github.com/compodoc/compodoc/issues/667' node_modules/@compodoc/compodoc/dist/index-cli.js",
"compodoc": "nodejs node_modules/@compodoc/compodoc/bin/index-cli.js -p src/tsconfig.app.json -s --language fr-FR -d compodoc-fr" "compodoc": "nodejs node_modules/@compodoc/compodoc/bin/index-cli.js -p src/tsconfig.app.json -s --language fr-FR -d compodoc-fr"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment