rauschma,
@rauschma@fosstodon.org avatar

1/ #npm package scripts: Windows vs. Unixes.

On macOS, I’m using these scripts:
"build": "npm run clean && tsc && npm run chmod",
"clean": "shx rm -rf ./dist/*",
"chmod": "chmod u+x ./dist/src/cmd.js",

Alas, the last script won’t work on Windows. What’s a good way to fix this?

tbroyer,
@tbroyer@piaille.fr avatar

@rauschma Would shx chmod work? (by ignoring the requested change IIUC)

jaandrle,
@jaandrle@fosstodon.org avatar

@tbroyer @rauschma Yah, https://www.npmjs.com/package/shx is nice for cross-platform usage. Also using it.

Otherwise, I am also sometimes using “bs”¹ approach, just scripts written in JavaScript (node js, nodejsscripts² or zx³). For example bs folder in https://github.com/jaandrle/deka-dom-el/.

[1] https://github.com/jaandrle/bs
[2] https://github.com/jaandrle/nodejsscript (WIP v1 https://github.com/jaandrle/nodejsscript/tree/dev-v1)
[3] https://github.com/google/zx also in combination with shx

rauschma,
@rauschma@fosstodon.org avatar

@jaandrle @tbroyer That’s a good idea!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • node
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines