Skip to content

Instantly share code, notes, and snippets.

View johnbcodes's full-sized avatar

John Bledsoe johnbcodes

View GitHub Profile
@johnbcodes
johnbcodes / build.rs
Created March 21, 2023 12:22
Invoke NPM from Cargo experiment
// As of 2023/03/21 there's no way to use Cargo's file watching (using mtime) with NPM
// to tell if any dependencies have changed. NPM rewrites package-lock.json even if no
// change occurs. Even a few package directories inside of node_modules get touched
// during the process so watching that directory does not work.
//
// Taking the idea even further still, there's now way to tell when transitive dependencies
// need updating.
//
// Will revisit once Orogene hopefully becomes more mature and feature complete:
// https://github.com/orogene/orogene