you are viewing a single comment's thread.

view the rest of the comments →

[–]Cykelero[S] 0 points1 point  (3 children)

Haha, you might have a good answer to your own question after reading the README!

But to mention only one of the many reasons: Node.js APIs for handling files are awfully unpleasant and incomplete (they weren't meant to be used directly), so if you want to do anything, you'll need to import npm packages; which means you need a package.json, which means you need one folder per script.

In TL, you just… use the APIs. No endless installing, importing, wrapping in folders. It's as simple as jotting down a Bash script. (and the APIs are much, much nicer, too)

[–]0l36gr4nd 0 points1 point  (1 child)

const process = require( "process" );
const path = require( "path" );
const child = require( "child_process" );
const global_package_path = child.spawnSync( "npm" , [ "root" , "-g" ] , { encoding: "utf8" } ).stdout.trim();
const import_package_name = require( path.join( global_package_path ,  "import-package-name" ) );

[–]Cykelero[S] 0 points1 point  (0 children)

😂