Skip to content

Commit

Permalink
Makefile to build elastic's CSS (#9581)
Browse files Browse the repository at this point in the history
Those steps need to be repeated once in a while when working with the
repository code, and now that's easier.
  • Loading branch information
pabzm authored Aug 13, 2024
1 parent 477e2bc commit 8685ca9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,17 @@ shasum:
roundcubemail-git: buildtools
git clone --branch=$(GITBRANCH) --depth=1 $(GITREMOTE) roundcubemail-git
(cd roundcubemail-git; bin/jsshrink.sh; bin/updatecss.sh; bin/cssshrink.sh)
(cd roundcubemail-git/skins/elastic; \
npx lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css; \
npx lessc --clean-css="--s1 --advanced" styles/print.less > styles/print.min.css; \
npx lessc --clean-css="--s1 --advanced" styles/embed.less > styles/embed.min.css)
(cd roundcubemail-git/skins/elastic && make css)
(cd roundcubemail-git/bin; rm -f transifexpull.sh package2composer.sh)
(cd roundcubemail-git; find . -name '.gitignore' | xargs rm -f)
(cd roundcubemail-git; find . -name '.travis.yml' | xargs rm -f)
(cd roundcubemail-git; rm -rf tests plugins/*/tests .git* .tx* .ci* .editorconfig* index-test.php Dockerfile Makefile package.json package-lock.json node_modules)
(cd roundcubemail-git; $(SEDI) 's/1.7-git/$(VERSION)/' index.php public_html/index.php installer/index.php program/include/iniset.php program/lib/Roundcube/bootstrap.php)
(cd roundcubemail-git; $(SEDI) 's/# Unreleased/# Release $(VERSION)'/ CHANGELOG.md)

buildtools: /tmp/composer.phar
buildtools: /tmp/composer.phar npm-install

npm-install:
npm install --include=dev --omit=optional

/tmp/composer.phar:
Expand All @@ -85,3 +84,6 @@ buildtools: /tmp/composer.phar
clean:
rm -rf roundcubemail-git
rm -rf roundcubemail-$(VERSION)*

css-elastic: npm-install
cd skins/elastic && make css
8 changes: 8 additions & 0 deletions skins/elastic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# No default target to avoid this being mistaken as sufficient preparation for
# running the code (these styles depend on bootstrap, which needs to be
# downloaded, too; see bin/install-jsdeps.sh in the repo's root).

css:
npx lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css
npx lessc --clean-css="--s1 --advanced" styles/print.less > styles/print.min.css
npx lessc --clean-css="--s1 --advanced" styles/embed.less > styles/embed.min.css

0 comments on commit 8685ca9

Please sign in to comment.