# KrikWP
Krikstudio's WordPress Boilerplate

## Features
* Better WordPress project structure
* PHP dependency management with Composer
* Front-end dependency management with NPM
* Environment variables with ENV
* Auto loading must-use plugins
* Auto generate WordPress SALT keys
* Enhanced security with WP Password Bcrypt
* Laravel Blade templates
* Code with ES6 & SASS in mind
* Build system with Webpack (Laravel Mix)
* Consistent coding styles with EditorConfig, PHP_CodeSniffer, ESLint & StyleLint
* Deploy & sync scripts
* Auto-login
* Recommended plugins
* Log PHP to Google Chrome console
* Support for WP-CLI
* Visual grid during development
* Ready for version control with Git

## Requirments
* PHP ^5.6
* [Git](https://git-scm.com)
* [Composer](https://getcomposer.org)
* [Node](https://nodejs.org) (NPM)
* [WP-CLI](http://wp-cli.org)
* [WP-CLI Dotenv](https://aaemnnost.tv/wp-cli-commands/dotenv)

## Recommended
* [EditorConfig](http://editorconfig.org)
* [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
* [ESLint](http://eslint.org)
* [StyleLint](https://stylelint.io)
* [Babun](http://babun.github.io)
* [Valet](https://github.com/laravel/valet)
* [KrikWP <3 Valet](https://gist.github.com/bumTomica/5d04186989b315fb029969a34a976c34)
* [PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef) for Google Chrome

## Install
1. git clone git@bitbucket.org:krikstudio/krikwp.git . && rm -rf .git && git init
2. composer install
3. npm install

## Commands
* npm run dev
* npm run watch
* npm run production
* npm run deploy
* npm run sync
* npm run colors
* composer permissions

## WP PHP Console
0. `PHP Console` Google Chrome extension needs to be installed
1. Activate WP PHP Console in WordPress plugins
2. Enter password in WP PHP Console settings
3. Enter password in PHP Console Chrome settings
4. Enable `Register PC Class` in WP PHP Console settings

## Logging
* @php(dd('Log to window & die'))
* @php(pc('Log to console & live'))

## PHP linters
* phpcs --standard=./ .
* phpcbf --standard=./ .
