From 79e99c20c28299b6e47ca214d779296835fe3ebf Mon Sep 17 00:00:00 2001 From: Tchama Date: Sat, 17 Apr 2021 23:32:47 +0200 Subject: [PATCH] install sass --- README.md | 3 ++- app/assets/app.js | 3 +++ app/assets/styles/app.scss | 0 app/package.json | 4 ++++ app/webpack.config.js | 2 +- app/yarn.lock | 22 +++++++++++++++++++++- 6 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 app/assets/styles/app.scss diff --git a/README.md b/README.md index 18bb204..202df43 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,5 @@ Cette branche dĂ©marre d'une installation toute prĂȘte de la demo Symfony. La db +++ DATABASE_URL="postgresql://postgres:secret@db:5432/postgres?serverVersion=12&charset=utf8" ``` * Create database schema: `bin/console doctrine:schema:create` - * `$ composer require symfony/webpack-encore-bundle` and `$ yarn install --force` + * `$ composer require symfony/webpack-encore-bundle` and `$ yarn install --force` + * `$ yarn add sass sass-loader` diff --git a/app/assets/app.js b/app/assets/app.js index bb0a6aa..1c1c8ae 100644 --- a/app/assets/app.js +++ b/app/assets/app.js @@ -8,5 +8,8 @@ // any CSS you import will output into a single css file (app.css in this case) import './styles/app.css'; +// SCSS +import './styles/app.scss'; + // start the Stimulus application import './bootstrap'; diff --git a/app/assets/styles/app.scss b/app/assets/styles/app.scss new file mode 100644 index 0000000..e69de29 diff --git a/app/package.json b/app/package.json index ba0e4f4..14859a4 100644 --- a/app/package.json +++ b/app/package.json @@ -14,5 +14,9 @@ "dev": "encore dev", "watch": "encore dev --watch", "build": "encore production --progress" + }, + "dependencies": { + "sass": "^1.32.10", + "sass-loader": "^11.0.1" } } diff --git a/app/webpack.config.js b/app/webpack.config.js index 056b04a..24bc396 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -56,7 +56,7 @@ Encore }) // enables Sass/SCSS support - //.enableSassLoader() + .enableSassLoader() // uncomment if you use TypeScript //.enableTypeScriptLoader() diff --git a/app/yarn.lock b/app/yarn.lock index 63a6723..39322cf 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -1578,7 +1578,7 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@^3.5.1: +"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== @@ -3163,6 +3163,11 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +klona@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.4.tgz#7bb1e3affb0cb8624547ef7e8f6708ea2e39dfc0" + integrity sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA== + loader-runner@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" @@ -4416,6 +4421,21 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sass-loader@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-11.0.1.tgz#8672f896593466573b904f47693e0695368e38c9" + integrity sha512-Vp1LcP4slTsTNLEiDkTcm8zGN/XYYrZz2BZybQbliWA8eXveqA/AxsEjllQTpJbg2MzCsx/qNO48sHdZtOaxTw== + dependencies: + klona "^2.0.4" + neo-async "^2.6.2" + +sass@^1.32.10: + version "1.32.10" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.10.tgz#d40da4e20031b450359ee1c7e69bc8cc89569241" + integrity sha512-Nx0pcWoonAkn7CRp0aE/hket1UP97GiR1IFw3kcjV3pnenhWgZEWUf0ZcfPOV2fK52fnOcK3JdC/YYZ9E47DTQ== + dependencies: + chokidar ">=3.0.0 <4.0.0" + sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"