-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c7e17e
commit e078139
Showing
25 changed files
with
15,840 additions
and
2,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
.DS_Store | ||
dist/electron/* | ||
dist/web/* | ||
dist/*/* | ||
build/* | ||
!build/icons | ||
node_modules/ | ||
npm-debug.log | ||
npm-debug.log.* | ||
thumbs.db | ||
!.gitkeep | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,79 @@ | ||
# Electron Vue Template | ||
# NFC-Electron Reader | ||
|
||
Uses Electron-Webpack, Electron Builder, Babel 7 and Vue | ||
Uses Electron-Webpack, Electron Builder, Babel 7 and Vue, internally powered by nfc-pcsc | ||
|
||
# Yarn | ||
|
||
- Electron Builder recommends using `Yarn` to build. When using Yarn, the lock file is used and guaranteed to download the correct version for the working build. There is no such guarantee for `npm` | ||
|
||
- To install `yarn`: | ||
|
||
``` | ||
npm install -g yarn | ||
``` | ||
|
||
- Switching to `yarn`: Remove `node_modules/` folder and then run | ||
|
||
``` | ||
yarn | ||
``` | ||
|
||
- To build with `yarn`, run: | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
## Build Process | ||
|
||
- To build: | ||
|
||
``` | ||
npm run build | ||
or | ||
yarn build | ||
``` | ||
|
||
- Note: Currently, it does not clean previous builds before building. Most of the time it would be fine, but if it does not build, remove all files and folders inside `dist/` and `build/` folders. DO NOT REMOVE `build/icons/` folder. | ||
|
||
### Special Note for Windows | ||
- This reader programs rely on node native module, which means it need to be recompiled before it can run. In windows, it can be difficult to set up environment | ||
- See [node-gyp](https://github.com/nodejs/node-gyp) for more details | ||
|
||
- In Windows: `node-gyp` and `windows-build-tools` are required. In an ELEVATED PowerShell, run: | ||
|
||
``` | ||
npm install -g node-gyp windows-build-tools | ||
``` | ||
|
||
- After install, reboot | ||
- Change directory and run: | ||
|
||
``` | ||
npm install | ||
npm run rebuild | ||
``` | ||
|
||
or | ||
|
||
``` | ||
yarn | ||
yarn build | ||
``` | ||
|
||
## Brief Explanation | ||
- Main Process: Controls communication with NFC Device. | ||
- Renderer Process: Reader/Writer Interface | ||
|
||
- Communication between Main and Renderer process: Via Electron IPC. Read/Write/Write-Readonly permissions as well as messages are set through ipc messages | ||
- Read [ipcRenderer](https://electronjs.org/docs/api/ipc-renderer) and [ipcMain](https://electronjs.org/docs/api/ipc-main) | ||
|
||
## Known Issues | ||
|
||
### Babel Plugins | ||
|
||
Due to how `electron-webpack` creates `babel-loader` for `webpack`, some plugins cannot be configured if installed as devDependencies. | ||
|
||
If you wishes to configure Babel plugins, install plugins as dependencies. | ||
If you wishes to configure these Babel plugins, install plugins as dependencies. |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.