DEV Community

Discussion on: Q: How to set up a Front End Environment in a PHP project?

Collapse
ope profile image
Ope Adeyomoye

If you're already pretty comfortable with JavaScript then one way to get comfortable with front-end development environments is to learn from templates.

If, for example, you decide to go with one of the JavaScript frameworks that are popularly used to create Single Page Applications(SPA), you're likely to find some sort of "starter pack" for that framework. And it'll usually include CSS pre-processors, JavaScript bundlers, and, importantly, good documentation on how they're pieced together.

Once you're comfortable with the front-end setup in your favorite JavaScript framework, it becomes clearer how to combine it with your PHP project to fit what you want.

(I usually just drop my package.json in the same directory my composer.json resides, npm install and continue the setup adventure :) )

Here are sample "starter packs" for a couple JavaScript frameworks: