wordpress - Using LESS and Version Control: Should generated CSS be included in a repo? -
I'm considering using less for CSS development with server (or development) side processing, but I Can not decide whether I should keep Season files in version control. There are lots of solutions with hooks, but it adds software dependency on the server. A hook can be added locally, so on the stage and in the production areas, the same file will be found. Therefore, the question is:
Should the CSS files be included in version control or not? Please keep in mind that some frameworks require a CSS file for a particular reason (for example, WordPress themes require a styled .css file so that they should be recognized).
Cheers!
EDIT: When I say 'considering using less', I mean that it becomes a requirement. After the option is reduced, new developers will not have the option of vanilla CSS.
You have a very high answer to your question. It depends on how it is positioned on your website.
If the server is just going to pull directly from the GIT repository:
1) Software is required to produce at least CSS.
2) or you need to include CSS files in the repository.
If you are not dragging directly from the repository on your web server, you can create a script that pulls from the git, generates CSS, and then the content in the web server (s) Transfers, possibly excluding unnecessary files from the transfer.
In my opinion, to keep all sources, the guit should be used for a project, and none of the "derivative works" (as described by Thebb). Developers are required to set up all the equipment to generate those derivative works during development and testing. For deployment on testing and production servers, an automated build server should take source and only create the necessary files for distribution.
In the case of software development, you will have a Makefile. In your GIT repository, a compiler is installed in H files (for example) developers and build servers that will create an executable or compiled library. When files are packaged for distribution, the source code is not a part of the collection.
For web development, you have source files like original graphics, HTML templates and fewer files. Developers and build servers can run scripts to create site assets (files less than CSS, static HTML from templates Page, flattened images in multiple sizes / formats etc.) When the build server deploys a new build, it only copies the required file source graphics, templates and g Excluding T files, server.
If there are people who need to review site content, then they should do it on a staging server. If this is not possible, then the automated build server can create a zip file on the internal file, Which they can download for review.
Comments
Post a Comment