Skip to content
Jean-Claude Vignoli edited this page Jun 2, 2022 · 4 revisions

Developers

Participate in development

Should you want to install Lumière! Movies on your computer to participate in the development, NPM and Composer are required.

Once installed, you should run: composer update npm update

The needed libraries will be installed.

Run local tests

Tests are run using Codeception, which is extends PHPUnit for WordPress. It comes shipped with composer tools. Tests are either run locally (local server, if you have PHP/MYSQL installed on your computer) or remotely (remote server). First you need to configure a .env.testing file, filling your personal values:

TEST_REMOTE_WP_URL='HTTPMYREMOTEURL' TEST_REMOTE_DB_DSN='mysql:host=REMOTESQLHOSTNAME;dbname=REMOTESQLDBNAME' TEST_REMOTE_DB_NAME='REMOTESQLPASSWORD' TEST_REMOTE_DB_HOST='REMOTESQLHOSTNAME' TEST_REMOTE_DB_USER='REMOTEUSER' TEST_REMOTE_DB_PASSWORD='REMOTEPASSWORD' TEST_REMOTE_ADMIN_EMAIL='REMOTEEMAIL'

TEST_REMOTE_FTP_PATH='/MYREMOTEPATH' TEST_REMOTE_FTP_HOST='REMOTEFTPHOST' TEST_REMOTE_FTP_USERNAME='REMOTEUSERNAME' TEST_REMOTE_FTP_PASSWORD='REMOTEPASSWORD' TEST_REMOTE_FTP_SSHKEY='SSHKEYLOCALFILE' TEST_REMOTE_FTP_PORT="MYREMOTEPORT"

TEST_LOCAL_SITE_WP_URL='HTTPMYLOCALURL' TEST_LOCAL_DB_DSN='mysql:host=LOCALSQLHOSTNAME;dbname=LOCALSQLDBNAME' TEST_LOCAL_DB_NAME='LOCALSQLPASSWORD' TEST_LOCAL_DB_HOST='LOCALSQLHOSTNAME' TEST_LOCAL_DB_USER='LOCALUSER' TEST_LOCAL_DB_PASSWORD='LOCALPASSWORD'

Then you can run all remote tests: php vendor/bin/codecept run -vvv acceptanceRemote --env wpfirefox Or run all local tests with: php vendor/bin/codecept run -vvv acceptanceLocal --env wpfirefox

Use gulp for development

Composer library gulp is used for development. A script copy all edited files from src/ to dist/, and then upload to a remote webserver the edited files. It automatically minimises JS and CSS files.

You need to create a config file named .gulpcredentials.js, where you fill you personal config values:

module.exports = { mainserver: { /* Remote server / dist: 'REMOTELUMIEREPLUGINPATH', hostname: 'REMOTEHOSTNAME', port: 'REMOTEPORT', username: 'REMOTEUSERNAME', key: 'REMOTESSHFILE'}, proxy: { / Local web address / address: 'LOCALWEBHTTPADRESS' }, base: { / if it must be an absolute path */ gulpimg: 'LOCALGULPPNGPICTUREFILE' } }

Then run npm run watch

Linting

Lumière! Movies comes with linting tools that can be run on all src/ files: npm run lint

Clone this wiki locally