Desktop application for development and deployment Pond consists of the following runtime components:
assets- images, JavaScript files, CSS filesbinary assets- this includes PHP binaries for Mac and WindowsElectronruns the desktop client, top level of the executionChromium browser- is run by Electron and represents the interactive layer of the applicationNode.jsis a top-level runtime environment, it's ran by ChromiumVue.js and Vuex.jsrender the HTML and manage the application runtime data stateBuilt-in PHP serverruns Pond projects, which chose to use the built-in server, and also runs PHP Deployer when the application is in the runtime mode (for the development needs we useTarget server dev environmentfor running the Deployer)Pouch DBused as a persistent data storagePond Agentis a special October plugin that Pond installs to configure a local project.
Note: all commands should be ran in the root directory, which contains the app subdirectory.
Prerequisites: node.js of version at lest 8.x is required for running unit tests. I used the version 6.x successfully for the development, but had to upgrade to run mocha tests.
In the root Pond directory run:
npm install
npm run watch
This will be updating assets in app/dist in live mode. It could take ~15 seconds to load first, but subsequent updates take milliseconds.
After that, in another terminal tab, start Electron:
npm run start
Find the PHP version specified in the file src/js/config/index.js in object path builtInServerInfo.darwin.php.version, for example 7.1.
- Download a PHP build matching the version here: https://php-osx.liip.ch/
- Run the installer
- Copy the directory from /usr/local/php.xxx to
app/src/assets-bin-php/darwin(so thatdarwincontainsbin,etc,liband so on). - Run
npm run copy-bin-assetsin the Pond's root directory.
Note: Following liip.ch's install will restart the Apache web server that ships with macOS. For those using MAMP, XAMPP, Docker or another web server on port 80, this may be confusing. Run
sudo /usr/sbin/apachectl stopto stop Apache.
- Download a PHP build matching the version here: https://windows.php.net/
- Run the installer
- Copy the directory from /usr/local/php.xxx to
app/src/assets-bin-php/win32(so thatdarwincontainsbin,etc,liband so on). - Run
npm run copy-bin-assetsin the Pond's root directory.