resources added and win build impl
This commit is contained in:
parent
1d68336a06
commit
e4b721115f
8 changed files with 8 additions and 8 deletions
|
|
@ -34,7 +34,7 @@
|
||||||
"start": "cross-env NODE_ENV=development webpack serve --hot --host 0.0.0.0 --config=./webpack.dev.config.js --mode development",
|
"start": "cross-env NODE_ENV=development webpack serve --hot --host 0.0.0.0 --config=./webpack.dev.config.js --mode development",
|
||||||
"build": "cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production",
|
"build": "cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production",
|
||||||
"package": "npm run build",
|
"package": "npm run build",
|
||||||
"postpackage": "electron-packager ./ --out=./builds --overwrite"
|
"postpackage": "electron-packager ./ --out=./builds --overwrite --platform win32,linux --icon marvin.ico --extra-resource 'resources/files'"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.0",
|
"@emotion/react": "^11.10.0",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"rootDir": "/home/rbrt/Schreibtisch/marvin"
|
|
||||||
}
|
|
||||||
3
resources/files/config/config.json
Normal file
3
resources/files/config/config.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"rootDir": "/home/rbrt/Schreibtisch/marvin/Gm312/leihgabenbegleitblaetter"
|
||||||
|
}
|
||||||
BIN
resources/files/templates/rp-template.docx
Normal file
BIN
resources/files/templates/rp-template.docx
Normal file
Binary file not shown.
|
|
@ -21,7 +21,7 @@ export async function fillTemplate(log, objectData) {
|
||||||
let documentInfo;
|
let documentInfo;
|
||||||
try {
|
try {
|
||||||
// Load config file.
|
// Load config file.
|
||||||
let ConfigFile = fs.readFileSync('resources/config/config.json')
|
let ConfigFile = fs.readFileSync('resources/files/config/config.json')
|
||||||
configJson = JSON.parse(ConfigFile)
|
configJson = JSON.parse(ConfigFile)
|
||||||
|
|
||||||
// Choose the template for selected document type.
|
// Choose the template for selected document type.
|
||||||
|
|
@ -46,7 +46,7 @@ export async function fillTemplate(log, objectData) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Read template.
|
// Read template.
|
||||||
const template = fs.readFileSync(path.join('resources/templates/', documentInfo.templateFile));
|
const template = fs.readFileSync(path.join('resources/files/templates/', documentInfo.templateFile));
|
||||||
|
|
||||||
// Create report.
|
// Create report.
|
||||||
buffer = await createReport({
|
buffer = await createReport({
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// Config
|
// Config
|
||||||
import configImport from '/resources/config/config.json'
|
import configImport from '/home/rbrt/WebstormProjects/marvin/resources/files/config/config.json'
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import {Log} from "../components/Log";
|
import {Log} from "../components/Log";
|
||||||
|
|
@ -49,7 +49,7 @@ export default function Settings() {
|
||||||
}
|
}
|
||||||
if (rootDirFromWindow) {
|
if (rootDirFromWindow) {
|
||||||
let message;
|
let message;
|
||||||
await writeFile('resources/config/config.json', JSON.stringify(config2Safe, null, 2), (err) => {
|
await writeFile('resources/files/config/config.json', JSON.stringify(config2Safe, null, 2), (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
message = err;
|
message = err;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue