0.0.2 • Published 4 years ago

malley-prairie v0.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

Malley prairie

made with love and:

Codeship Statuses :

Codeship Status for antistatique/malley-prairie

🔧 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

  1. Setup your .env file with database access and environment variables. You can find our ACF PRO key on 1Password.

  2. Setup your virtualhost (like http://website.test) to serve /web.

  3. Install Wordpress and dependencies using composer

composer install
  1. 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

🕙 Crons

Crontab

🔐 Security