OpenINF / openinf.github.io

โšก๐Ÿ‹ The OpenINF portal, other static resources, and more static electricity
https://open.inf.is
5 stars 3 forks source link

๐Ÿ—โœจ๏ผšadd nps start task #1282

Closed DerekNonGeneric closed 2 months ago

DerekNonGeneric commented 2 months ago

(mostly self-explanatory altho i have tried to collect a lot of scattered lore dictating its “idiomatic” correctness)

“Running Locally” section of our portal documentation describes usage of this task, but had yet to be implemented:

[…] Run this from within the project workspace root directory:

nps start

Once the script finishes building the documentation site, one may visit it at http://localhost:4000/. […]

we're not only going to be fulfilling this need here, but also getting rid of the old way we had been doing this — our new “Start” task is intended to serve as our project's “Default” task, was pulled from our pre-existing “Serve” task, which was originally in tasks.json of /.vscode/, but as we're continuing our plans on significantly augmenting it… https://github.com/OpenINF/openinf.github.io/blob/d3210b42b0db5b095a8f04dd734001097f5ec11c/.vscode/tasks.json#L1-L26

…that will no longer be how we run project tasks as we'd like to achieve more independence from VS Code (eventually becoming IDE/editor-agnostic)^1

for additional context, read the bottom of the “This solution” section of original nps readme:

You don't have to use the start script if you don't want. Note that if you're writing a node application, you're likely using start for starting your server. In that case, you can create a default script which will be run when nps is run without arguments (so effectively it'll work just the same). But if you'd prefer, you can use whatever you wish. […]

the above wouldn't really make much sense unfamiliar w/ the npm ecosystem, so also read the following:

also, check out how @gulpjs displays when the default task is running:

netlify[bot] commented 2 months ago

Deploy Preview for gh-pages-openinf failed.

Name Link
Latest commit 2cb5c33b20fdc3aadff667e0ebe7704971538bcf
Latest deploy log https://app.netlify.com/sites/gh-pages-openinf/deploys/6672695a0e72b90008c846d1
DerekNonGeneric commented 2 months ago

memory still hazy from vacation, but i think we still may need to ensure that the SCSS is getting compiled and may need to actually create an actual script to run

aside: whoops, found mistakes in https://github.com/OpenINF/openinf.github.io/blob/live/build/tasks/compile/build-portal.mts

โ€”โ€”-

i think we should introduce https://esbuild.github.io/getting-started/ (for sanity)

DerekNonGeneric commented 2 months ago

i just noticed that this is going to need some refactoring; see similar:

this is tentatively how it was looking for us, but obviously some adjustments are necessary:

image

DerekNonGeneric commented 2 months ago

i am thinking we should enable incremental regeneration (not only for posts, but assets too)

๐Ÿ”— https://jekyllrb.com/docs/configuration/incremental-regeneration/

DerekNonGeneric commented 2 months ago

i will do a follow-up wrt augmenting nps start task and flesh out the server

DerekNonGeneric commented 2 months ago

(not planning to roll back ruby just for netlify, they can upgrade their tools)

DerekNonGeneric commented 2 months ago

(not planning to roll back ruby just for netlify, they can upgrade their tools)

just to clarify, iโ€™d still like to ensure our web services stay up and continuous delivery processes stay green, but relying on netlify (who doesnโ€™t always have the tool versions we need) to build the portal is simply untenable; we need another solution…