From a930fef52a5964373c48c78e4209ea5b1dba6b17 Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Wed, 8 Jun 2022 11:38:32 +0200 Subject: [PATCH] Updates frontend-building related Makefile rules to also create the dist/icons.css file. Updates the core/src/icons.js script to allow it to run before 'npm run dev', 'npm run build', or 'npm run watch' is run. Signed-off-by: Cyrille Bollu --- Makefile | 7 +++++-- core/src/icons.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e178d84b8c995..0570d48b8f831 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,18 @@ npm-update: npm update # Building -build-js: +build-js: build-css npm run dev build-js-production: npm run build -watch-js: +watch-js: build-css npm run watch +build-css: + npm run sass:icons + # Linting lint-fix: npm run lint:fix diff --git a/core/src/icons.js b/core/src/icons.js index 6ea8070c9128a..63ba05d6f43b2 100644 --- a/core/src/icons.js +++ b/core/src/icons.js @@ -332,4 +332,5 @@ css += generateVariablesAliases(true) css += '}' // WRITE CSS +fs.mkdir('dist', (err) => { return }); fs.writeFileSync(path.join(__dirname, '../../dist', 'icons.css'), sass.compileString(css).css)