Clone this repository, go to the plugin root directory and run
$ composer install
$ cd tests/Application
If needed, create .env.local
file with the correct configuration for your environment in the tests/Application
directory.
Then run the following commands from tests/Application
:
$ bin/console doctrine:database:create
$ bin/console doctrine:schema:create
$ bin/console sylius:fixtures:load
$ bin/console assets:install --symlink
Copy package.json.~1.xx.dist
file to package.json
for specific version of Sylius (example for 1.12.0):
$ cp package.json.\~1.12.dist package.json
Then:
$ yarn install
$ yarn dev
You're ready to start coding 🎉
To start the development server, from the tests/Application
directory run:
$ symfony server:start
and then you should get information about the server address and port (usually http://localhost:8000).
If you don't already have Symfony CLI, here's how to install it: https://symfony.com/download
To start working on frontend, from the tests/Application
directory run:
$ yarn watch
It's an infinite process, which will watch your changes in the assets folder and (re)build them. So all of your frontend changes should be done in {root}/src/Resources/assets
directory. We have configured two independent entry points that should not be combined - shop
for the storefront and admin
for the admin panel.
⚠ Note: Before every commit, you should type the
yarn dist
command from the plugin root directory to rebuild dist assets, which are located in{root}/src/Resources/public
.
You also shouldn't add assets to this folder manually because they will be removed automatically