From 49864874fc28f4b202e86f61581825542ebe1679 Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Fri, 24 May 2024 13:40:59 -0500 Subject: [PATCH] dev script updates for scss watch --- .vscode/launch.json | 23 ++++++++++++++++++++--- .vscode/tasks.json | 16 ++++++++++------ package.json | 6 +++--- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d558314..8a44977 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,7 @@ { "console": "integratedTerminal", "internalConsoleOptions": "neverOpen", - "name": "nodemon", + "name": "nodemon (dev)", "program": "dev", "request": "launch", "restart": true, @@ -17,7 +17,24 @@ ], "type": "node", "env": {"NODE_ENV": "development"}, - "preLaunchTask": "npm: scss" - } + "preLaunchTask": "npm: build-css" + }, + { + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "name": "nodemon (with scss watch)", + "program": "dev (with scss watch)", + "request": "launch", + "restart": true, + "runtimeExecutable": "nodemon", + "runtimeArgs": ["-e", "js,scss"], + "skipFiles": [ + "/**" + ], + "type": "node", + "env": {"NODE_ENV": "development"}, + "preLaunchTask": "npm: build-css" + }, + ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 51203ad..5ba5947 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,17 +3,21 @@ "tasks": [ { "type": "npm", - "script": "scss", + "script": "watch-scss", "problemMatcher": [], - "label": "npm: scss watch", - "detail": "sass --watch src/scss/application.scss public/css/application.css src/scss/eventsheet.scss:public/css/eventsheet.css" + "label": "npm: watch-scss", + "detail": "npm run watch-css", + "icon": { + "id": "eye", + "color": "terminal.ansiBlue" + } }, { "type": "npm", - "script": "scss", + "script": "build-css", "problemMatcher": [], - "label": "npm: scss", - "detail": "sass src/scss/application.scss:public/css/application.css src/scss/eventsheet.scss:public/css/eventsheet.css" + "label": "npm: build-css", + "detail": "npm build-css" } ] } \ No newline at end of file diff --git a/package.json b/package.json index 66ef4a6..0328e2d 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ }, "scripts": { "start": "node ./bin/www", - "dev": "nodemon . & npm run scss", - "scss": "sass src/scss/application.scss:src/public/css/application.css src/scss/eventsheet.scss:src/public/css/eventsheet.css", - "scss watch": "sass --watch src/scss/application.scss:src/public/css/application.css src/scss/eventsheet.scss:src/public/css/eventsheet.css" + "dev": "nodemon .", + "build-css": "sass src/scss:src/public/css", + "watch-scss": "nodemon -e scss -x \"npm run build-css\"" }, "dependencies": { "@teamsnap/teamsnap-ui": "^3.12.3",