Adding Symfony support should be relatively easy. We don't have to setup Symfony like WordPress, we could just ensure that correct paths are set and some additional files are created when running Chisel in a Symfony project which was already setup. When doing so there are 2 conflicting files in Symfony installation - .gitignore and README.md, we could merge them with our files.
Below is a working configuration which can serve as a documentation for manual setup in the meanwhile.
Directory structure when Chisel files are added to a Symfony project:
- app
- bin
- gulp
- node_modules
- src
- AppBundle
- tests
- var
- vendor
- web - publicly available web folder in Symfony
- src
- assets
- scripts
- styles
- assets
- scripts
- styles
chisel.dest.base in package.json should be set to web
chisel.src.base in package.json should be set to web/src
proxy.target in Gulp serve.js should be set to 127.0.0.1:8000, that's where Symfony app runs
Use of revisioned_path function in Twig templates:
Adding Symfony support should be relatively easy. We don't have to setup Symfony like WordPress, we could just ensure that correct paths are set and some additional files are created when running Chisel in a Symfony project which was already setup. When doing so there are 2 conflicting files in Symfony installation - .gitignore and README.md, we could merge them with our files.
Below is a working configuration which can serve as a documentation for manual setup in the meanwhile.
Directory structure when Chisel files are added to a Symfony project:
chisel.dest.base
inpackage.json
should be set toweb
chisel.src.base
inpackage.json
should be set toweb/src
proxy.target
in Gulpserve.js
should be set to127.0.0.1:8000
, that's where Symfony app runsUse of
revisioned_path
function in Twig templates:Twig extension for the revisioned_path function: