cmda-bt / be-course-20-21

🎓 Backend · 2020-2021 · Curriculum and Syllabus

Home Page:http://www.bloktech.nl/back-end

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Week 1

ReiniervanLimpt opened this issue · comments

Package

Name

Reinier van Limpt

Class

Tech 5 b

Repo link

https://github.com/ReiniervanLimpt/project-tech-21

Summary

Ive set up my dev environment and workflow with some (pre) scripts:

package file
npm run dev now starts my server and has nodemon watching over any changes i make in my server.js and all connected modules (nodemon restarts the server every time i do).

Ive also included a predev script that runs build:css which is specified in my gulpfile.js pipeline to build css from ./src/styles.scss (whcih is sass) and place the compiled css file in public/dist.

The dist folder will be emptied and filled with a new css file every time i call npm run dev by running a script prebuild that runs rimraf ./public/dist which is a prebuild:css script so this will always happen right before the css is built.

On top of that ive included a watch:css script which watches my src folder for any changes i make to my css and html (hbs) files and proxies a server to port 3001 by using browsersync, every time i make changes to css this refreshes the page with the new css changes ive made.

Heres a link to the gulpfile which includes the sass and watch script.

the assignment

Ive included a templating engine (handlebars) to send "hello world" as a title when i res.render home.hbs.

Resources used

browsersync
gulp
rimraf
nodemon
handlebars templating

Any thoughts?

The assignment seems to be documented a bit better than when i last did this course, this could be because i understand the subjet a bit better but... nice!