| Q | A
| ---------------- | -----
| Bug report? | no
| Feature request? | yes
| BC Break report? | no
| RFC? | yes
| Sylius version | 1.4.0
I just noticed, that there is no way to really extend the js/css files generated using gulp. As of now, I found literally no documentation or articles about how to possibly overcome that limitation.
As I'm currently creating a sylius shop for a friend of mine, which would require adding a slider js library and some css customizations (actually sass, as link colors need to be changed).
Then I saw that yargs is used to pass arguments to the gulpfiles of the admin and shop bundles and found this section about passing arrays as arguments.
Now I wonder if it would be an option to also pass additional paths to the gulpfiles to generate the normal output files, but with custom files attached. That way, no extra {{ asset(...) }} stuff is needed in the custom templates, which as of now seems to be the only available way to add extra js and css to both, the frontend and the backend.
I haven't done much frontend development recently, but I know, it's recommended to have all js/css in one minified file for production for the sake of speed and bandwidth. For now I'll just go the {{ asset() }} route though -
Hi @GameplayJDK unfortunately, there is no one good solution for that, you need to customize gulp yourself to fit your needs. But we know the problem and that’s why we are creating a new theme using Webpack and Bootstrap. It's very easy to add new or edit defaults assets there. You can find it here
I have now found a rather hacky way of adding my own sources to the gulp tasks. Had to copy the both gulp files delivered with ShopBundle and AdminBundle, change some pathes and stuff. But there has to be a better option, as any upgrade will likely break my changes.
Most helpful comment
Hi @GameplayJDK unfortunately, there is no one good solution for that, you need to customize gulp yourself to fit your needs. But we know the problem and that’s why we are creating a new theme using Webpack and Bootstrap. It's very easy to add new or edit defaults assets there. You can find it here