-
Notifications
You must be signed in to change notification settings - Fork 15
Setting up the development environment
For development, we use both PHPStorm and Docker.
PHPStorm should load the appropriate settings by default, although if you don't have things such as php
or node
+eslint
in your PATH you may run into issues.
For Docker we use docker-compose, and it's a fairly simple docker-compose up
to get up and running.
Volumes have been set up so "most" changes done locally will also be synced with docker. This doesn't apply everywhere though, so check over the docker-compose.yml to see what works.
Assuming everything works, the dev site should now be available under http://manga-tracker.localhost:20180 (If you are having issues however, you may need to manually add manga-tracker.localhost to your host file)
To make userscript development work with Docker, a little bit of manual intervention is required.
- Open a cmd/terminal in the manga-tracker folder.
- Run
php _scripts/userscript_prodtodev.php
. This will generate a dev userscript in the same folder as the other one. This should be used for local testing as it utilizes the Docker URL. - To convert this back to commit-able format, run
php _scripts/userscript_devtoprod.php
. (If you are using PHPStorm, a File Watcher has been setup to make this automatic)