malley-prairie
v0.0.2
Published
made with love and:
Downloads
2
Readme
Malley prairie
made with love and:
Codeship Statuses :
🔧 Prerequisites
First of all, you need to have the following tools installed globally on your environment:
- composer
don't forget to add bins to your path such:
- php
- mysql
🚛 Install
Wordpress and dependencies
Setup your .env file with database access and environment variables. You can find our ACF PRO key on 1Password.
Setup your virtualhost (like
http://website.test
) to serve/web
.Install Wordpress and dependencies using composer
composer install
- Install and configure PHPCS for coding standards, see this section.
Styleguide
- serve your project :
$ yarn start
- build your project :
$ yarn build
- deploy your gh-pages :
$ yarn deploy
- publish your frontend build :
$ sh ./publish.sh VERSION<0.0.0> ON_NPM<true>
- publish your development frontend build :
$ sh ./publish_dev.sh
🚀 Deploy
First time
# You need to have ruby & bundler installed
$ bundle install
$ npm install -g yarn
How it works
There are 4 websites (fmp, cmp, cve, cpale).
We use Capistrano to deploy:
bundle exec cap -T
Example Malleyprairie (fmp).
bundle exec cap fmp-staging deploy
bundle exec cap fmp-prodution deploy
🚔 Check Wordpress coding standards & best practices
phpcs
You need to run composer before using PHPCS. Then register the Wordpress and WordpressPractice Standard with PHPCS:
$ vendor/bin/phpcs --config-set installed_paths wpcs
Command Line Usage
Check Wordpress best practices:
$ vendor/bin/phpcs --standard=WordPress --colors --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md web/app/themes/malley-prairie/resources
Automatically fix coding standards
$ vendor/bin/phpcbf --standard=Wordpress --colors --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md ./web/app/themes/malley-prairie/resources --ignore=web/app/themes/malley-prairie/resources/functions.php,web/app/themes/malley-prairie/resources/index.php
Enforce code standards with git hooks
Maintaining code quality by adding the custom post-commit hook to yours.
$ cat ./scripts/hooks/post-commit >> ./.git/hooks/post-commit