Quick start
- First, let's kick the tyres by open the project folder and run the command line:
yarn install
Runnpm start
to see your app atlocalhost:3000
Building & Deploying
- Run
npm run build
which will compile all the necessary files to thebuild
folder. - Upload the contents of the
build
folder to your web server's root folder. - You can use Apache or any web server to handle the build folder. For more detail how to deploy to S3 or Heroku, please take a look from - https://github.com/react-boilerplate/react-boilerplate/blob/master/docs/general/deployment.md
Building cross platform desktop app (base on Electron library)
Modify electron/script/package.json to edit
App name
Description
Author
Version of app
Modify resources for adding icon of app:
icon.icns: icon for mac app
icon.ico: windows app
Folder icons: icon for linux app (optional, can be removed. If removed => autogenerated from icon.icns):
Icon inside folder icons must have name in format of size: 32x32
Modify ROOT/package.json (build field) to edit (we have 2 package.json file)
App id
Category
NOTE: directories information should not be modified
To create installer file, run:
yarn run pack
Note: Installer file will be placed on installer folder. You need the Mac OS to generate the .DMG installer file and the Window OS to generate the .EXE file.
Project config.
As the project is integrated with Wordpress API, you need to upgrade your Wordpress to latest version which support REST API build-in, to check the Wordpress API is available try to paste this URL to your browser to see list of Endpoint support:
Example:
Once you have checked the API, you can change the URL config from: app/config/config.json
Replace the wpEndPoint by your wordpress Endpoint: https://your-domain/wp-json
and also update wpURL and CDNUrl if you have CDN config for image assets.