Open johndwells opened 8 years ago
I'm starting to worry about our template task (this also relates to #2); there are a few scenarios cropping up where the template sync gets messy. There seems an increasingly likely chance that at some point we (or a plugin) may attempt to write initially to the craft/templates
folder, and our task risks blindly wiping those changes.
Which leads me to 2 possible alternatives:
1 - opt for the solution where we are only template syncing a single, special, obviously named template folder like _compiled-templates
, so that at least as a rule we know that craft/templates/_compiled-templates
should never be edited directly.
2 - ditch this entire concept until we find a more acceptable solution. Because, correct me if I'm wrong, the only reason why we're doing this is for bower - and it's not something we really need. Of course it's a convenience tool, but if it causes our system to be a) more distributed across the filesystem, b) complex to maintain, and c) more prone to fault, then I think there are perfectly viable alternatives.
Because of my lack of familiarity with Bower, and a desire to keep this tool understandable and maintainable, I'm leaning towards the 2nd option - again, at least until we can establish a more effective workflow.
Also worth noting that neither option actually addresses the root of this originating issue - so now I'm thinking that perhaps a pre-installed database dump is in fact the way to go. At least with Craft's version releases, we will be able to tell when the schema actually changes (it has a schema number that is different from the software version), so it's ever so slightly easier to track this.
When first generating a site, and then going to the browser to install Craft, it's installation process overwrites our boilerplate files placed into
craft/templates
.Our generator should only place our templates into
src/templates
, and rely exclusively on our gulp tasks to handle the copying.Or, we include a database dump of a fresh install. But then we have to worry about tracking Craft's schema.