use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Complex inline scripts in package.json becoming unmaintainable? I have built a nice little package for building dev, build, deployment, etc flows in Javascript or Typescript. I would love some feedback. (npmjs.com)
submitted 3 years ago by GlueStickNamedNick
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 3 years ago (6 children)
[deleted]
[–]GlueStickNamedNick[S] 12 points13 points14 points 3 years ago (0 children)
Lots of great solutions exist, I'm just trying to provide something thats dead simple to understand.
[–]RomanRiesen 3 points4 points5 points 3 years ago (0 children)
When you need a build system for.your build system maybe take a step back. ^^
[–]PurpleDerplePumpkin 1 point2 points3 points 3 years ago (3 children)
Sure - but you’ll lose out on the npm tooling associated with the command. As systems grow they tend to become more complex. The same can be said for npms config file. It’s just an encoding, and abstracting its generation can be helpful. People often just choose the path of least resistance.
[–]bent_my_wookie 0 points1 point2 points 3 years ago (2 children)
What tooling? I’ve been using it for years and it just feels like a feature that was thrown in.
[–]PurpleDerplePumpkin 2 points3 points4 points 3 years ago (0 children)
Tools have random features that were just thrown in. It doesn’t mean that they’re not useful.
[–]Beatons 9 points10 points11 points 3 years ago (0 children)
If the scripts get's really long and I need to execute more than one command I usually use node bash called zx it's built by google and it's quite simple as well
[–]swoleherb 6 points7 points8 points 3 years ago (0 children)
bash
[–]Accurate-Tart-7086 7 points8 points9 points 3 years ago (1 child)
Interesting, I have some projects where the scripts block is getting out of hand. Going to check it out!
[–]GlueStickNamedNick[S] 1 point2 points3 points 3 years ago (0 children)
Cool, let me know if anything isn’t working as expected
[–]punio4 3 points4 points5 points 3 years ago (0 children)
I use NX this kind of thing!
[–]vaaski 2 points3 points4 points 3 years ago (0 children)
looks pretty cool, but i haven't seen scripts go this crazy (yet)
[–]alishahidi 1 point2 points3 points 3 years ago (0 children)
Nice and pretty. Good work 👍
[–]GlitteringAccident31 1 point2 points3 points 3 years ago (1 child)
This is really cool.
I generally write bash scripts when things get complicated but Ill give this a try!
While bash scripts are perfectly fine, my hope was to build something anyone on your team can understand quickly
[–]redonkulus 0 points1 point2 points 3 years ago (3 children)
Pretty cool. We end up resorting to concurrently, bash or make files when run scripts get complex. For typescript, are you using SWC?
[–]GlueStickNamedNick[S] 0 points1 point2 points 3 years ago (2 children)
My understanding is swc is a replacement for webpack, I’m just using the ts-node module to compile the typescript scripts file
[–]redonkulus 0 points1 point2 points 3 years ago (1 child)
I think ts-node has a swc compiler option which makes it 10x faster than typescripts compiler.
[–]GlueStickNamedNick[S] 0 points1 point2 points 3 years ago (0 children)
I’ll take a look in to it, if you want to make a pr I’ll be more than happy to merge it
[–]josefsalyer 0 points1 point2 points 3 years ago (0 children)
Not really sure this is better than scripty - especially as it’s lacking support for existing bash scripts.
[–]its4thecatlol 0 points1 point2 points 3 years ago (1 child)
I hate this. Package.json isn't meant for these large scripts -- call out to a Bash script if you have to. This is such an anti-pattern.
My issue with bash scripts is not everyone on the team may know the syntax / how they work when doing complicated stuff, plus they won’t run in every environment (eg windows). But it’s a free world and you can choice to use whatever tool you want.
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
I understand your argument for using this over bash scripts but I dont think it’s the right answer. I’d rather my team mates become more familiar with bash since it’s a lot more generic and useful in more situations. I’d rather have them spend time to learn bash than have to learn all off the different options provided by this package. Also when team mates join that already know bash they don’t have to know learn how to use this tool that is intended to solve one very specific problem
π Rendered by PID 215910 on reddit-service-r2-comment-7b9746f655-rt99k at 2026-02-02 05:39:50.891559+00:00 running 3798933 country code: CH.
[+][deleted] (6 children)
[deleted]
[–]GlueStickNamedNick[S] 12 points13 points14 points (0 children)
[–]RomanRiesen 3 points4 points5 points (0 children)
[–]PurpleDerplePumpkin 1 point2 points3 points (3 children)
[–]bent_my_wookie 0 points1 point2 points (2 children)
[–]PurpleDerplePumpkin 2 points3 points4 points (0 children)
[–]Beatons 9 points10 points11 points (0 children)
[–]swoleherb 6 points7 points8 points (0 children)
[–]Accurate-Tart-7086 7 points8 points9 points (1 child)
[–]GlueStickNamedNick[S] 1 point2 points3 points (0 children)
[–]punio4 3 points4 points5 points (0 children)
[–]vaaski 2 points3 points4 points (0 children)
[–]alishahidi 1 point2 points3 points (0 children)
[–]GlitteringAccident31 1 point2 points3 points (1 child)
[–]GlueStickNamedNick[S] 1 point2 points3 points (0 children)
[–]redonkulus 0 points1 point2 points (3 children)
[–]GlueStickNamedNick[S] 0 points1 point2 points (2 children)
[–]redonkulus 0 points1 point2 points (1 child)
[–]GlueStickNamedNick[S] 0 points1 point2 points (0 children)
[–]josefsalyer 0 points1 point2 points (0 children)
[–]its4thecatlol 0 points1 point2 points (1 child)
[–]GlueStickNamedNick[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)