For the sake of quickness, the usage of a tool like Parcel shows that its efficiency is indeed undeniable.
So, if you want to edit assets (js, scss, ...) you'll likely go into src/Resources/dev
and run yarn install
.
Then, you'll find a list of commands inside package.json
which are :
$ (cd src/Resources/dev && yarn build)
Or, if you prefer the dev mode; a watch
command that compile in real time, then run:
$ (cd src/Resources/dev && yarn dev)
You can add any resources as far as Parcel can go, but those have to be located in /pages
otherwize they won't be compiled.
Assets can be found in src/Resources/public/assets/oney
so you'll have to install them in your application by running:
$ bin/console assets:install --symlink
# or
$ bin/console sylius:theme:assets:install --symlink # e.g if bootstrapTheme is enabled
To make it fully compatible with Sylius Bootstrap Theme, some lines have to be added to ̀the main entrypoint (such as app.js
) of the theme:
const $ = require('jquery');
global.$ = global.jQuery = $;