dev script updates for scss watch

This commit is contained in:
2024-05-24 13:40:59 -05:00
parent e9fd60e619
commit 49864874fc
3 changed files with 33 additions and 12 deletions

23
.vscode/launch.json vendored
View File

@@ -7,7 +7,7 @@
{ {
"console": "integratedTerminal", "console": "integratedTerminal",
"internalConsoleOptions": "neverOpen", "internalConsoleOptions": "neverOpen",
"name": "nodemon", "name": "nodemon (dev)",
"program": "dev", "program": "dev",
"request": "launch", "request": "launch",
"restart": true, "restart": true,
@@ -17,7 +17,24 @@
], ],
"type": "node", "type": "node",
"env": {"NODE_ENV": "development"}, "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": [
"<node_internals>/**"
],
"type": "node",
"env": {"NODE_ENV": "development"},
"preLaunchTask": "npm: build-css"
},
] ]
} }

16
.vscode/tasks.json vendored
View File

@@ -3,17 +3,21 @@
"tasks": [ "tasks": [
{ {
"type": "npm", "type": "npm",
"script": "scss", "script": "watch-scss",
"problemMatcher": [], "problemMatcher": [],
"label": "npm: scss watch", "label": "npm: watch-scss",
"detail": "sass --watch src/scss/application.scss public/css/application.css src/scss/eventsheet.scss:public/css/eventsheet.css" "detail": "npm run watch-css",
"icon": {
"id": "eye",
"color": "terminal.ansiBlue"
}
}, },
{ {
"type": "npm", "type": "npm",
"script": "scss", "script": "build-css",
"problemMatcher": [], "problemMatcher": [],
"label": "npm: scss", "label": "npm: build-css",
"detail": "sass src/scss/application.scss:public/css/application.css src/scss/eventsheet.scss:public/css/eventsheet.css" "detail": "npm build-css"
} }
] ]
} }

View File

@@ -24,9 +24,9 @@
}, },
"scripts": { "scripts": {
"start": "node ./bin/www", "start": "node ./bin/www",
"dev": "nodemon . & npm run scss", "dev": "nodemon .",
"scss": "sass src/scss/application.scss:src/public/css/application.css src/scss/eventsheet.scss:src/public/css/eventsheet.css", "build-css": "sass src/scss:src/public/css",
"scss watch": "sass --watch src/scss/application.scss:src/public/css/application.css src/scss/eventsheet.scss:src/public/css/eventsheet.css" "watch-scss": "nodemon -e scss -x \"npm run build-css\""
}, },
"dependencies": { "dependencies": {
"@teamsnap/teamsnap-ui": "^3.12.3", "@teamsnap/teamsnap-ui": "^3.12.3",