2
0
mirror of https://github.com/frappe/books.git synced 2025-01-11 02:36:14 +00:00

Merge pull request #216 from 18alantom/fix-build

fix: bump versions and background.js changes to get books to build.
This commit is contained in:
Alan 2021-09-30 14:58:32 +05:30 committed by GitHub
commit 3ec4e0a955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 4045 additions and 3340 deletions

View File

@ -91,6 +91,14 @@ yarn link
yarn link frappejs
```
### FAQ
1. Launching electron and nothing displays
https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/24#issuecomment-770165389
```
sudo chown root node_modules/electron/dist/chrome-sandbox && sudo chmod 4755 node_modules/electron/dist/chrome-sandbox
```
## License
[GNU Affero General Public License v3.0](LICENSE)

View File

@ -20,9 +20,9 @@
"@popperjs/core": "^2.0.3",
"core-js": "^3.4.3",
"electron-store": "^5.1.0",
"frappe-charts": "^1.3.0",
"frappejs": "https://github.com/frappe/frappejs",
"knex": "^0.20.4",
"frappe-charts": "1.6.1",
"knex": "^0.95.11",
"lodash": "^4.17.15",
"luxon": "^1.21.3",
"portal-vue": "^2.1.6",
@ -38,7 +38,8 @@
"@vue/cli-service": "^4.1.0",
"@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3",
"electron": "^6.0.0",
"electron": "^8.0.0",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^0.2.1",
"electron-updater": "^4.2.0",
"eslint": "^5.16.0",
@ -47,7 +48,7 @@
"lint-staged": "^9.4.3",
"prettier": "^1.19.1",
"raw-loader": "^4.0.0",
"vue-cli-plugin-electron-builder": "https://github.com/netchampfaris/vue-cli-plugin-electron-builder",
"vue-cli-plugin-electron-builder": "^2.0.0",
"vue-template-compiler": "^2.6.10"
},
"gitHooks": {
@ -55,5 +56,8 @@
},
"lint-staged": {
"*.{js,vue}": "vue-cli-service lint"
},
"engines": {
"node": ">=16.4.0"
}
}

View File

@ -23,7 +23,7 @@
<script>
import './styles/index.css';
import 'frappe-charts/dist/frappe-charts.min.css';
// import 'frappe-charts/dist/frappe-charts.min.css';
import frappe from 'frappejs';
import Desk from './pages/Desk';
import SetupWizard from './pages/SetupWizard/SetupWizard';

View File

@ -2,9 +2,10 @@
import { app, protocol, BrowserWindow, ipcMain } from 'electron';
import { autoUpdater } from 'electron-updater';
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer';
import {
createProtocol,
installVueDevtools
createProtocol
// installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib';
import theme from '@/theme';
import { getMainWindowSize } from './screenSize';
@ -34,7 +35,7 @@ function createWindow() {
width,
height,
webPreferences: {
nodeIntegration: true
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
},
frame: isLinux,
resizable: true
@ -67,7 +68,7 @@ function createSettingsWindow(tab = 'General') {
height: 577,
backgroundColor: theme.backgroundColor.gray['200'],
webPreferences: {
nodeIntegration: true
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
},
resizable: false
});
@ -119,7 +120,7 @@ app.on('ready', async () => {
// If you are not using Windows 10 dark mode, you may uncomment these lines
// In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines
try {
await installVueDevtools();
await installExtension(VUEJS_DEVTOOLS);
} catch (e) {
console.error('Vue Devtools failed to install:', e.toString());
}

View File

@ -59,7 +59,7 @@ export default {
renderChart(res) {
let totalRow = res.rows[res.rows.length - 1];
const chart = new Chart(this.$refs['profit-and-loss'], {
new Chart(this.$refs['profit-and-loss'], {
title: '',
animate: false,
type: 'bar',

View File

@ -26,13 +26,13 @@
</template>
<script>
import frappe from 'frappejs';
import Observable from 'frappejs/utils/observable';
// import Observable from 'frappejs/utils/observable';
import PageHeader from '@/components/PageHeader';
import Button from '@/components/Button';
import SearchBar from '@/components/SearchBar';
import List from './List';
import listConfigs from './listConfig';
import Icon from '@/components/Icon';
// import Icon from '@/components/Icon';
import FilterDropdown from '@/components/FilterDropdown';
export default {
@ -43,7 +43,7 @@ export default {
List,
Button,
SearchBar,
Icon,
// Icon,
FilterDropdown
},
activated() {

View File

@ -211,7 +211,7 @@ export function makePDF(html, destination) {
height: 842,
show: false,
webPreferences: {
nodeIntegration: true
nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION
}
});

View File

@ -2,6 +2,11 @@ const path = require('path');
const webpack = require('webpack');
module.exports = {
pluginOptions: {
electronBuilder: {
nodeIntegration: true
}
},
pages: {
index: {
entry: 'src/main.js',

7337
yarn.lock

File diff suppressed because it is too large Load Diff