Less live build #946
No reviewers
Labels
No Label
bug
build
cgi Scripting
design
disruptive
documentation
duplicate
easy
feature-request
help wanted
javascript
priority/low
question
system-hackers
tagging
text
translations
wait/bugfix
wait/inprogress
wait/misc
wait/proofread
wontfix
xsl
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: FSFE/fsfe-website#946
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/dev-less"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
This PR introduces a live build of the less files in the browser.
It removes the
fsfe.min.css
from the repo.Why
This should solve some issues regarding styles:
lessc
for developmentfsfe.min.css
file are avoidedHow
There is now a new file
config.xsl
in the project root. Depending on thecss-mode
variable it uses the live browser less build or includes thefsfe.min.css
.browser
→ less browser buildcompiled
→ includefsfe.min.css
ToDo
There are still some things to do to make this work.
@reinhard maybe you could have a look at the idea. For the build system setup I also need your help (see ToDo).
cc @max.mehl
How cool!
To build the .min.css files, I think the main (phase 1) Makefile would be the ideal place.
There might be better ways to distingiush between development and production environment, for example by adding a xslt parameter which is automatically set in the build script. I first need to understand which actually should be development environment, and which should be production environment. For example, will the automatic build of test.fsfe.org be production or development?
@reinhard I took another round with Max to integrate the valentine mode as well. We updated the name of the control file to
config
. The variable is nowcss-mode
. Max suggested to simplysed
thecss-mode
in the make file. Could you prepare that.Sorry, I didn't see Reinhard's suggestion before, a parameter would be even cooler, but to be honest I don't have a strong preference here.
IMHO production or
compiled
as it is called now. The server can take care of the CSS generation, so I see no reason for increasing the loading time.So the dynamic genereration of the CSS with JavaScript is intended only for the case when fsfe-local-build is used with fsfe-preview.sh, correct?
Yes, it's only for local development.
Great feature, thank you! Just a reminder that once this gets merged we should update this documentation.
WIP: Less live buildto Less live build@reinhard if you're happy with it could you prepare the make file?
lessc
then has also to be available on the build system.I'll update the wiki page right after the merge.
Sorry, I was busy today, will comment tomorrow.
Really nice, thank you @mweimann and @reinhard !
For all people who already use local build, it's important to run
fsfe-preview --copy look/ build/ scripts/
to have everything prepared. From then on, all pages have to be rebuild at least once to render them correctly since fsfe.min.css is no longer available. But probably a full rebuild would make sense anyway.I wrote a ticket for updating the wiki and send a mail to the list: #967
I'll do that later.