buildchain - mckennatim/gitinfo GitHub Wiki

< home

js webpack babel ts react node npm build chains

Every few years you need to update all your packages and modify how you build projects. Past working build environments include spa, spa1, hooks, hooks2, and partially working build environments include hooks3' v17andv18`. Most articles create one build environment with its own node_modules for each project. I prefer creating multiple projects on top of one master package.json and node_modules shared by all projects.

Running git.sh 00-tag which is globally available and lives in /home/tim/.scripts updates git, pushes to github and makes a copy of essential files to tags/00-tag

managing node and nvm versions for stack

  1. put an .nvmrc file in the root of the stack with just a sting like v19.4.0
  2. before running an npm script for a project, run nvm use to grab that node version along with its correct npm version

useful tools and subtasks

  • npm npm-update: to update package.json to all the latest package release versions
  • npx depcheck: for analyzing the dependencies in a project

updating @mckennatim libraries

  1. copy the es6 src directory to a directory in /iot
  2. replace references to the npm package with an import from

log

1/24/23

v18 stack has 0 vulnerabilities and iot/wsclient compiles and runs in th browser connection to the server and the mqtt broker

1/23/23

set up this page.

Continue to work on minimum viable mqtt client and minimally viable zone-timer

  • hooks2 seems to be the best working stack for iot. Uses node v14.15.4 (npm v6.14.10), [email protected], @[email protected] and [email protected]. MQTT runs as does range-timer.
  • v17 has no iot and was used to selectively update parts of the tcard app
  • v18 is a not complete updated stack. As of 1/22/23 only iot/wsclient compiles. I has basic react, routing and screen-size-detection/multiple-panes using history and context. The intent is to cerate a minimally viable wsmqtt client here. None of the tcard apps will run here as material ui won't work with v18.

refs

https://javascript.plainenglish.io/learn-5-optimization-tips-for-webpack-step-by-step-cc81eb41a1c7

https://betterprogramming.pub/how-to-create-and-publish-react-typescript-npm-package-with-demo-and-automated-build-80c40ec28aca#b9e9

https://snyk.io/blog/best-practices-create-modern-npm-package/