A PHP powered custom web app cms system
- NPM Package Manager - Used for managing and importing external packages and for running Gulp tasks for automation. NPM packages are not included in the production version. https://nodejs.org/en/download/
- Composer - PHP lib manager https://getcomposer.org/download/
- vendor - php libs
- node_modules - external packages, exclude in production
- tools - another Composer folder for dev only. Contains Php Cs Fixer https://github.com/FriendsOfPHP/PHP-CS-Fixer, PHPStan https://github.com/phpstan/phpstan, PHP Codesniffer https://github.com/squizlabs/PHP_CodeSniffer, Php Mess Detector https://phpmd.org/. All recommended plugins for dev in php. Recommended for use with Jetbrains PHPStorm and Visual Studio Code
- Install/Update NPM and Composer
- Setup local server and SQL - eg, Xampp https://www.apachefriends.org/index.html, https://xdebug.org/, *This guide will assist with X-Debug setup. https://gist.github.com/odan/1abe76d373a9cbb15bed
- Run 'npm install' and 'composer require' in the root project folder.
- Navigate to the tools folder and run 'composer require' there too to install the dev tools. Dev tools not for use in production
Mysql PDO for greater compatibility
Gulp automates:
- 'gulp jsCompile' JS concatenation and minification and headers
- 'gulp jsSingle' Minifies single js files from ./src/js-single to ./js
- 'gulp vendor' Copies libs from './node_modules' to './vendor' eg. Bootstrap, Jquery, fontawesome
- 'gulp emails' Converts simple html templates in bootstrap format into email templates
- 'gulp images' Compresses and moves images from './src/img' to './img'
- 'gulp zipFile' Adds the project folder into a zip file for convenient exporting
- 'gulp watch' Watches all files in './src' and auto-compiles the files
- 'gulp build' Performs all compilation tasks
- 'gulp dist' Compiles the webroot files without the dev files in './dist'
Get to know the 'gulpfile.js' - it's awesome