Skip to content

App build process

Bob Mitro edited this page Jun 20, 2018 · 20 revisions

Required software

For app build you will need the following software installed:

  • node.js (8.*)
  • npm (>= 5.*)
  • python (>= 2.5.0 && < 3.0.0)
  • electron (in version used by Publii), electron-packager, node-gyp and gulp node.js modules installed globally

Only for Windows:

  • npm install --global --production windows-build-tools

Only for macOS:

  • Install XCode

Build process

In the root project directory run:

npm install
cd app
npm install
cd ..
npm run dev

When the files are compiled run:

npm run build

keytar, sharp and node-expat node modules compilation

If you get errors regarding improper version of some node modules according to your node.js version, run the following command in the directory of these modules:

  • app/node_modules/keytar
  • app/node_modules/sharp
  • app/node_modules/node-expar
node-gyp rebuild --target=ELECTRON_VERSION --arch=x64 --dist-url=https://atom.io/download/atom-shell

ELECTRON_VERSION - replace with current version of the Electron used in the app.

Permission issues

If you have problems with the E_ACCESS, you can try to add in the npm commands the following params: --unsafe-perm=true --allow-root.

Clone this wiki locally