Ivan Gretsky Posted December 14, 2015 Share Posted December 14, 2015 Good day everyone! There was some talk about using frontend development technologies like node and gulp and bower with PW. I actually started to incorporate them in my workflow on the latest projects. But I did not make a conscious decision on where to put the root of all my frontend dev ops in the PW folder structure. My first intention was to put my package.json, gulpfile.js and bower.json in the templates folder. Jonathan Lahijani suggested doing so in his epic video. So I've done. But it always looked messy to have node_modules, bower_components, .sass-cache and all the little .json files in there. But now I have a bigger problem - all those files seem to cause errors when running "Translate files" in languages. So I decided to rethink this. Do I really have to put all that stuff in templates folder? Should I put them in site or even in the root folder? That are benefits and downsides of each option? Are there any possible collisions in multisite installations? I ask you to share your experience and thoughts on the topic. 1 Link to comment Share on other sites More sharing options...
LostKobrakai Posted December 14, 2015 Share Posted December 14, 2015 I'd the same problem with my composer files and ultimately decided to put everything into the site folder, whereas the templates folder should only hold things that really belong there (php files and compiled js / css files). I found this to be most in line with the already present structure of things. site/ does hold all site specific data and package.js and other files are configuration like config.php. 2 Link to comment Share on other sites More sharing options...
SiNNuT Posted December 14, 2015 Share Posted December 14, 2015 I don't have much recent experience but Like LostKobrakai i used to put that kind of stuff in the site folder, which i consider the root of a project. I only use the templates folder for final production files. So i usually have something like site/src with all css/scss/less/js source files and then build into the templates folder and sub-folders. I'm not familiar with multi site so i don't know about the pros and cons there. 1 Link to comment Share on other sites More sharing options...
kongondo Posted December 14, 2015 Share Posted December 14, 2015 Maybe the ideas presented here The Wire Render Pattern by @cclsource ould help you decide? 3 Link to comment Share on other sites More sharing options...
pwired Posted December 14, 2015 Share Posted December 14, 2015 Yes, lately I am following the Wire Render Pattern by @cclsource because for me it adds perfectly to the delayed output strategy and makes things very organized. (also in a workflow) Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 14, 2015 Author Share Posted December 14, 2015 ...i used to put that kind of stuff in the site folder, which i consider the root of a project... This is what I've been thinking about. There are things like .htaccess that go to root but are still closely related to a project. On the other side there may be more than one template folders in one site directory with some different design... I guess I am still thinking in a "installable template" kind of way. Maybe the ideas presented here The Wire Render Pattern by @cclsource ould help you decide? Camilo is talking about something different - code organization in templates folder - but it was an amazing read. I am using a quite a similar pattern. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now