Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from gulp #632

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

artfulrobot
Copy link
Contributor

The project's sass had not been compiled for 2 years, and in that time gulp has changed a lot, and after spending an hour or two trying to get gulp 4 working with the old gulpfile, I gave up.

This PR simplifies the compilation a lot; we now only depend on one npm package, sass, and we run it directly - see the compile-sass-to-css.sh file.

Works for me!

I updated the docs, too.

As part of this work I realised that this extension depends on shoreditch, but only for building its css.

PS. I built this on top of #631 and there was a commit that didn't quite make it into that PR that's included in this. Other than that minor change, I don't think there were any other sass/css changes made.

@mattwire mattwire merged commit f5cce21 into veda-consulting-company:2.x Jan 19, 2024
1 check passed
@mattwire
Copy link
Collaborator

Nice, thanks @artfulrobot I wonder if it could be made to depend on https://lab.civicrm.org/extensions/theisland instead of shoreditch?

@artfulrobot
Copy link
Contributor Author

@mattwire I'm not sure. I'm not sure why it needs to pull in bootstrap stuff - don't we have that in core anyway now? Anyhow, a job for another day!

@MegaphoneJon
Copy link
Contributor

There is no dependency on Shoreditch anymore: #236

@mattwire
Copy link
Collaborator

@MegaphoneJon Are you sure? There's no dependency at runtime but seems there still might be for compiling the SASS

@artfulrobot
Copy link
Contributor Author

Now: build instructions tell you to clone shoreditch inside this ext dir, and this is then referenced by relative paths in:
https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/blob/2.x/sass/mosaico-bootstrap.scss#L1-L16 Can build Sass offline.

Previously: no reference to shoreditch but gulpfile assumed to be able to find it in the normal extensions place. this made the sass build process depend on (a) shoreditch source in the normal ext dir, and (b) being able to run cv in order to discover the dir meaning you had to have PHP and a cv-bootable CRM environment to compile sass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants