didi-pc-sdk
use with vue-cli-plugin-electron-builder
Developer Setup
First, you'll need Node.js which matches our current version.
You can check .nvmrc
in the development
branch to see what the current version is. If you have nvm
you can just run nvm use
in the project directory and it will switch to the project's
desired Node.js version. nvm for windows is
still useful, but it doesn't support .nvmrc
files.
Then you need git
, if you don't have those yet.
Now, run these commands in your preferred terminal in a good directory for development:
npm install didi-pc-sdk
finally, You need to add sequelize and sqlite in your vue.config.js for example:
configureWebpack: {
devtool: "source-map",
externals: {
sequelize: "require('sequelize')",
sqlite3: "require('sqlite3')",
},
},
pluginOptions: {
electronBuilder: {
externals: ['sequelize'],
nodeIntegration : true
}
}
Other
Windows
- log folder:
%USERPROFILE%\AppData\Roaming\{App Name}\logs\{YYYY-MM-DD}.log
- db folder:
%USERPROFILE%\AppData\Roaming\{App Name}\didi-message-sdk.db
macOS
- log folder:
~/Library/Logs/{App Name}/{YYYY-MM-DD}.log
- db folder:
~/Library/Application Support/{App Name}/didi-message-sdk.db