morehumaninternet / roar-server

GNU General Public License v3.0
0 stars 0 forks source link

scss, pre-compile jsx, cleaner watch script, working test coverage, precommit hooks #87

Closed will-weiss closed 3 years ago

will-weiss commented 3 years ago

A number of quality of life improvements, the output of the build script is far more readable and restarts much more quickly.

Also adds ahead of time compilation of scss and the jsx templates.

Also adds code coverage

$ npm run dev

> @ dev /Users/willweiss/dev/morehumaninternet/roar-server
> NODE_ENV=dev npm run build -- --watch

> @ build /Users/willweiss/dev/morehumaninternet/roar-server
> npm run clear && node build.js "--watch"

> @ clear /Users/willweiss/dev/morehumaninternet/roar-server
> concurrently 'rimraf bundled' 'rimraf css' 'rimraf html'

[0] rimraf bundled exited with code 0
[1] rimraf css exited with code 0
[2] rimraf html exited with code 0
🛠  Building the Roar! server in watch mode 

typescript 2021-01-05 21:01:39.557 
typescript 2021-01-05 21:01:39.557 9:01:39 PM - Starting compilation in watch mode...
typescript 2021-01-05 21:01:39.557 
views 2021-01-05 21:01:39.641 
views 2021-01-05 21:01:39.641 > @ views /Users/willweiss/dev/morehumaninternet/roar-server
views 2021-01-05 21:01:39.641 > node views.js "--watch"
views 2021-01-05 21:01:39.641 
scss:index 2021-01-05 21:01:39.743 Compiled scss/index.scss to css/index.css.
scss:index 2021-01-05 21:01:39.743 Sass is watching for changes. Press Ctrl-C to stop.
scss:index 2021-01-05 21:01:39.743 
scss:common 2021-01-05 21:01:39.785 Compiled scss/common.scss to css/common.css.
scss:common 2021-01-05 21:01:39.786 Sass is watching for changes. Press Ctrl-C to stop.
scss:common 2021-01-05 21:01:39.786 
scss:welcome 2021-01-05 21:01:39.838 Compiled scss/welcome.scss to css/welcome.css.
scss:welcome 2021-01-05 21:01:39.839 Sass is watching for changes. Press Ctrl-C to stop.
scss:welcome 2021-01-05 21:01:39.839 
views 2021-01-05 21:01:40.076 Compiling ./views/index.jsx
views 2021-01-05 21:01:40.388 Compiling ./views/welcome.jsx
views 2021-01-05 21:01:40.393 Compiled .jsx files in /views to /html
typescript 2021-01-05 21:01:42.708 
typescript 2021-01-05 21:01:42.708 9:01:42 PM - Found 0 errors. Watching for file changes.

🎉 First build successful! Continuing to watch files...

> @ start /Users/willweiss/dev/morehumaninternet/roar-server
> node -r source-map-support/register compiled/entry.js

roar-server listening on 5004 Tue Jan 05 2021 21:01:43 GMT-0500 (Eastern Standard Time)
Established connection to redis
typescript 2021-01-05 21:02:39.217 
typescript 2021-01-05 21:02:39.217 9:02:39 PM - File change detected. Starting incremental compilation...
typescript 2021-01-05 21:02:39.217 
typescript 2021-01-05 21:02:39.298 
typescript 2021-01-05 21:02:39.298 9:02:39 PM - Found 0 errors. Watching for file changes.
restarting server...

> @ start /Users/willweiss/dev/morehumaninternet/roar-server
> node -r source-map-support/register compiled/entry.js

roar-server listening on 5004 Tue Jan 05 2021 21:02:40 GMT-0500 (Eastern Standard Time)
Established connection to redis
typescript 2021-01-05 21:07:17.277 
typescript 2021-01-05 21:07:17.277 9:07:17 PM - File change detected. Starting incremental compilation...
typescript 2021-01-05 21:07:17.277 
typescript 2021-01-05 21:07:17.343 
typescript 2021-01-05 21:07:17.343 9:07:17 PM - Found 0 errors. Watching for file changes.
restarting server...

> @ start /Users/willweiss/dev/morehumaninternet/roar-server
> node -r source-map-support/register compiled/entry.js

roar-server listening on 5004 Tue Jan 05 2021 21:07:18 GMT-0500 (Eastern Standard Time)
Established connection to redis