ing
This commit is contained in:
parent
4695d7042c
commit
d6387fc33c
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"name": "overflow-network-scanner-app",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"author": {
|
|
||||||
"name": "LOAFLE",
|
|
||||||
"email": "rnd@loafle.com",
|
|
||||||
"url": "https://www.loafle.com"
|
|
||||||
},
|
|
||||||
"homepage": "https://www.loafle.com",
|
|
||||||
"description": "Desktop App for overFlow Network Scanner",
|
|
||||||
"dependencies": {
|
|
||||||
"electron-devtools-installer": "^2.2.4",
|
|
||||||
"electron-window-state": "^5.0.1",
|
|
||||||
"file-url": "^2.0.2",
|
|
||||||
"rxjs": "^6.2.2",
|
|
||||||
"sqlite3": "^4.0.2"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,7 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
const ElectronConnectWebpackPlugin = require('electron-connect-webpack-plugin');
|
const ElectronConnectWebpackPlugin = require('electron-connect-webpack-plugin');
|
||||||
const nodeExternals = require('webpack-node-externals');
|
const nodeExternals = require('webpack-node-externals');
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ module.exports = function () {
|
||||||
extensions: ['.ts', '.tsx', '.mjs', '.js'],
|
extensions: ['.ts', '.tsx', '.mjs', '.js'],
|
||||||
modules: [
|
modules: [
|
||||||
root(),
|
root(),
|
||||||
'node_modules'
|
'node_modules',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
config.module = {
|
config.module = {
|
||||||
|
@ -58,11 +59,11 @@ module.exports = function () {
|
||||||
};
|
};
|
||||||
config.plugins = [
|
config.plugins = [
|
||||||
PROD ? new webpack.NoEmitOnErrorsPlugin() : null,
|
PROD ? new webpack.NoEmitOnErrorsPlugin() : null,
|
||||||
PROD ? new CopyWebpackPlugin(
|
// PROD ? new CopyWebpackPlugin(
|
||||||
[
|
// [
|
||||||
'config/package.json'
|
// 'config/package.json'
|
||||||
]
|
// ]
|
||||||
) : null,
|
// ) : null,
|
||||||
new webpack.DefinePlugin(
|
new webpack.DefinePlugin(
|
||||||
Object.assign({}, replacements, {
|
Object.assign({}, replacements, {
|
||||||
__PROCESS_KIND__: JSON.stringify('main'),
|
__PROCESS_KIND__: JSON.stringify('main'),
|
||||||
|
|
|
@ -18,6 +18,11 @@ module.exports = function (config) {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
crossOriginLoading: false,
|
crossOriginLoading: false,
|
||||||
};
|
};
|
||||||
|
// config.resolve.modules = [
|
||||||
|
// root(),
|
||||||
|
// root('build', 'dist', 'node_modules'),
|
||||||
|
// 'node_modules',
|
||||||
|
// ];
|
||||||
|
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new webpack.DefinePlugin(
|
new webpack.DefinePlugin(
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"npmSkipBuildFromSource": false,
|
"npmSkipBuildFromSource": false,
|
||||||
"artifactName": "${name}-${version}-${os}-${arch}.${ext}",
|
"artifactName": "${name}-${version}-${os}-${arch}.${ext}",
|
||||||
"directories": {
|
"directories": {
|
||||||
"app": "./build/dist",
|
"buildResources": "./config/build/${os}/icon",
|
||||||
"output": "./build/package"
|
"output": "./build/package"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -17,26 +17,12 @@
|
||||||
"**/*",
|
"**/*",
|
||||||
"!*.ts",
|
"!*.ts",
|
||||||
"!*.scss",
|
"!*.scss",
|
||||||
"!*.code-workspace",
|
|
||||||
"!@overflow/",
|
|
||||||
"!build/",
|
|
||||||
"!config/",
|
|
||||||
"!e2e/",
|
|
||||||
"!src/",
|
|
||||||
"!.editorconfig",
|
|
||||||
"!.gitignore",
|
|
||||||
"!angular.json",
|
|
||||||
"!karma.conf.js",
|
|
||||||
"!LICENSE.md",
|
|
||||||
"!package.json",
|
|
||||||
"!package-lock.json",
|
|
||||||
"!README.md",
|
|
||||||
"!tsconfig.json",
|
|
||||||
"!tslint.json",
|
|
||||||
"!webpack.js",
|
|
||||||
"!yarn.lock"
|
"!yarn.lock"
|
||||||
]
|
],
|
||||||
}
|
"from": "./build/dist/",
|
||||||
|
"to": "."
|
||||||
|
},
|
||||||
|
"packages.json"
|
||||||
],
|
],
|
||||||
"extraFiles": [
|
"extraFiles": [
|
||||||
{
|
{
|
||||||
|
@ -48,7 +34,10 @@
|
||||||
"target": [
|
"target": [
|
||||||
{
|
{
|
||||||
"target": "deb",
|
"target": "deb",
|
||||||
"arch": ["x64"]
|
"arch": [
|
||||||
|
"ia32",
|
||||||
|
"x64"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"executableName": "overFlow-NetworkScanner",
|
"executableName": "overFlow-NetworkScanner",
|
||||||
|
@ -71,7 +60,9 @@
|
||||||
"minimumSystemVersion": "10.12.0",
|
"minimumSystemVersion": "10.12.0",
|
||||||
"extendInfo": "config/build/darwin/Info.plist",
|
"extendInfo": "config/build/darwin/Info.plist",
|
||||||
"icon": "config/build/darwin/icon/icon.icns",
|
"icon": "config/build/darwin/icon/icon.icns",
|
||||||
"target": ["dmg"],
|
"target": [
|
||||||
|
"dmg"
|
||||||
|
],
|
||||||
"extraFiles": [
|
"extraFiles": [
|
||||||
{
|
{
|
||||||
"from": "build/nrfjprog/unpacked/nrfjprog",
|
"from": "build/nrfjprog/unpacked/nrfjprog",
|
||||||
|
@ -101,7 +92,10 @@
|
||||||
"target": [
|
"target": [
|
||||||
{
|
{
|
||||||
"target": "nsis",
|
"target": "nsis",
|
||||||
"arch": ["x64", "ia32"]
|
"arch": [
|
||||||
|
"x64",
|
||||||
|
"ia32"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"legalTrademarks": "overFlow",
|
"legalTrademarks": "overFlow",
|
||||||
|
|
14
package.json
14
package.json
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "overflow-network-scanner-app",
|
"name": "overflow-network-scanner-app",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
"author": {
|
"author": {
|
||||||
"name": "LOAFLE",
|
"name": "LOAFLE",
|
||||||
"email": "rnd@loafle.com",
|
"email": "rnd@loafle.com",
|
||||||
|
@ -9,7 +10,7 @@
|
||||||
"homepage": "https://www.loafle.com",
|
"homepage": "https://www.loafle.com",
|
||||||
"description": "Desktop App for overFlow Network Scanner",
|
"description": "Desktop App for overFlow Network Scanner",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "npm-run-all -s electron:builder:init electron:builder:install-app-deps",
|
"postinstall": "npm-run-all -s electron:builder:install-app-deps",
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "npm-run-all start:electron:hmr",
|
"start": "npm-run-all start:electron:hmr",
|
||||||
"start:hmr": "ng serve --configuration hmr",
|
"start:hmr": "ng serve --configuration hmr",
|
||||||
|
@ -23,13 +24,16 @@
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
"wait-on:build:main:dev": "wait-on http-get://localhost:4200/ && npm-run-all build:main:dev",
|
"wait-on:build:main:dev": "wait-on http-get://localhost:4200/ && npm-run-all build:main:dev",
|
||||||
"electron:builder:init": "cpx config/package.json build/dist/",
|
|
||||||
"electron:builder:install-app-deps": "electron-builder install-app-deps",
|
"electron:builder:install-app-deps": "electron-builder install-app-deps",
|
||||||
"electron:builder:linux": "cross-env NODE_ENV=production npm-run-all build && electron-builder build --linux"
|
"electron:builder:packaging": "cross-env NODE_ENV=production npm-run-all build && electron-builder build",
|
||||||
|
"electron:builder:windows": "npm-run-all electron:builder:packaging -- --windows",
|
||||||
|
"electron:builder:macos": "npm-run-all electron:builder:packaging -- --macos",
|
||||||
|
"electron:builder:linux": "npm-run-all electron:builder:packaging -- --linux"
|
||||||
},
|
},
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-devtools-installer": "^2.2.4",
|
"electron-devtools-installer": "^2.2.4",
|
||||||
|
"electron-window-state": "^5.0.1",
|
||||||
|
"file-url": "^2.0.2",
|
||||||
"rxjs": "^6.2.2",
|
"rxjs": "^6.2.2",
|
||||||
"sqlite3": "^4.0.2"
|
"sqlite3": "^4.0.2"
|
||||||
},
|
},
|
||||||
|
@ -77,9 +81,7 @@
|
||||||
"electron-connect": "^0.6.3",
|
"electron-connect": "^0.6.3",
|
||||||
"electron-connect-webpack-plugin": "^0.1.1",
|
"electron-connect-webpack-plugin": "^0.1.1",
|
||||||
"electron-debug": "^2.0.0",
|
"electron-debug": "^2.0.0",
|
||||||
"electron-window-state": "^5.0.1",
|
|
||||||
"file-uri-to-path": "^1.0.0",
|
"file-uri-to-path": "^1.0.0",
|
||||||
"file-url": "^2.0.2",
|
|
||||||
"fs-extra": "^7.0.0",
|
"fs-extra": "^7.0.0",
|
||||||
"ip-cidr": "^2.0.0",
|
"ip-cidr": "^2.0.0",
|
||||||
"jasmine-core": "~2.99.1",
|
"jasmine-core": "~2.99.1",
|
||||||
|
|
|
@ -74,7 +74,7 @@ export class AppWindow {
|
||||||
'build',
|
'build',
|
||||||
'linux',
|
'linux',
|
||||||
'icon',
|
'icon',
|
||||||
'overflow_512_shadow.png'
|
'overflow_512_outline2.png'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
|
import * as Path from 'path';
|
||||||
|
|
||||||
import { AppModule } from './app/app.module';
|
import { AppModule } from './app/app.module';
|
||||||
import { environment } from './environments/environment';
|
import { environment } from './environments/environment';
|
||||||
|
|
||||||
|
@ -16,7 +18,7 @@ if (environment.production) {
|
||||||
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);
|
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
|
||||||
if (environment.hmr) {
|
if (environment.hmr) {
|
||||||
if (module[ 'hot' ]) {
|
if (module['hot']) {
|
||||||
hmrBootstrap(module, bootstrap);
|
hmrBootstrap(module, bootstrap);
|
||||||
} else {
|
} else {
|
||||||
console.error('HMR is not enabled for webpack-dev-server!');
|
console.error('HMR is not enabled for webpack-dev-server!');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user