From e9dd047749d93adafb849b48b34d88caf0808776 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 18 Nov 2021 15:59:47 +0100 Subject: [PATCH] Using SCSS. --- assets/{style.css => style.scss} | 5 ++--- package-lock.json | 16 ++++++++++------ package.json | 8 +++++--- 3 files changed, 17 insertions(+), 12 deletions(-) rename assets/{style.css => style.scss} (97%) diff --git a/assets/style.css b/assets/style.scss similarity index 97% rename from assets/style.css rename to assets/style.scss index 4c1b6e69..9f10d5f5 100644 --- a/assets/style.css +++ b/assets/style.scss @@ -9,8 +9,7 @@ .peertube-plugin-livechat-buttons { display: flex; - flex-direction: row; - flex-wrap: wrap; + flex-flow: row wrap; justify-content: flex-end; } @@ -72,7 +71,7 @@ table.peertube-plugin-livechat-prosody-list-rooms { border: 1px solid black; - margin: 5px 0px; + margin: 5px 0; } table.peertube-plugin-livechat-prosody-list-rooms tr:nth-child(odd) { diff --git a/package-lock.json b/package-lock.json index e16a92c9..a09cb491 100644 --- a/package-lock.json +++ b/package-lock.json @@ -764,7 +764,6 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "optional": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -1161,8 +1160,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "optional": true + "dev": true }, "bluebird": { "version": "3.7.2", @@ -1548,7 +1546,6 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, - "optional": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3908,7 +3905,6 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "optional": true, "requires": { "binary-extensions": "^2.0.0" } @@ -5548,7 +5544,6 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "optional": true, "requires": { "picomatch": "^2.2.1" } @@ -5760,6 +5755,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sass": { + "version": "1.43.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.43.4.tgz", + "integrity": "sha512-/ptG7KE9lxpGSYiXn7Ar+lKOv37xfWsZRtFYal2QHNigyVQDx685VFT/h7ejVr+R8w7H4tmUgtulsKl5YpveOg==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0" + } + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", diff --git a/package.json b/package.json index 569b2eb7..e97878e1 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ } ], "css": [ - "assets/style.css" + "dist/assets/style.css" ], "dependencies": { "async": "^3.2.2", @@ -57,6 +57,7 @@ "eslint-plugin-promise": "^5.1.1", "eslint-plugin-standard": "^5.0.0", "npm-run-all": "^4.1.5", + "sass": "^1.43.4", "stylelint": "^14.0.1", "stylelint-config-recommended-scss": "^5.0.1", "stylelint-config-standard-scss": "^2.0.1", @@ -86,10 +87,11 @@ "build:server": "npx tsc --build server/tsconfig.json", "build:serverconverse": "mkdir -p dist/server/conversejs && cp conversejs/index.html dist/server/conversejs/", "build:prosodymodules": "mkdir -p dist/server/prosody-modules && cp -r prosody-modules/* dist/server/prosody-modules/", - "build": "npm-run-all -s clean:light -p build:converse build:images build:webpack build:server build:serverconverse build:prosodymodules", + "build:styles": "sass assets:dist/assets", + "build": "npm-run-all -s clean:light -p build:converse build:images build:webpack build:server build:serverconverse build:prosodymodules build:styles", "lint": "npm-run-all -s lint:script lint:styles", "lint:script": "npx eslint --ext .js --ext .ts .", - "lint:styles": "stylelint 'conversejs/**/*.scss'", + "lint:styles": "stylelint 'conversejs/**/*.scss' 'assets/**/*.css'", "show:npmfiles": "npx npm-packlist" }, "staticDirs": {