proposal-hashbang
zx
proposal-hashbang | zx | |
---|---|---|
8 | 115 | |
133 | 41,816 | |
- | 2.7% | |
0.0 | 8.5 | |
almost 2 years ago | about 14 hours ago | |
HTML | JavaScript | |
- | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
proposal-hashbang
-
Javascript, the GOAT of programming languages that will take over the world in 2024
Before ECMAScript 2023 (ES14), executing a JavaScript file directly from the command line required manually specifying the interpreter path in the first line of the module. This process could vary depending on the operating system and Node.js installation.ES14 standardizes the use of hashbangs (#!) in JavaScript modules, enabling direct execution without the need for explicit interpreter invocation. The hashbang syntax is a simple convention that indicates the interpreter to be used for executing a module. It consists of a shebang (#!) followed by the path to the interpreter and optionally any arguments. For a JavaScript file, the hashbang line typically includes the path to the Node.js executable.
- What's new in ES2023?
-
ES2023 features list!
https://github.com/tc39/proposal-hashbang has some details.
-
JavaScript's New Features: Exploring the Latest Additions to the Language
Hashbang Grammar
- ES2023 candidate source code + spec
-
Updates from the 91st TC39 meeting
Hashbang Grammar: match de-facto usage in some CLI JS hosts that allow for #! Shebangs / Hashbang.
-
cmru is a command runner that allows you to describe commands with javascript.
But if you just wanted to execute it directly then you could use a shebang because everything after the bang is interpreted and not the bang its self. Most js engines allow this in some form. Here is a proposal to standardize it. https://github.com/tc39/proposal-hashbang
- Released Google/zx – tons of DX improvements and more
zx
-
How and why do we bundle zx?
When zx first appeared, it was a tiny esm script that just proposed a new idea for how child_process.spawn API could be enhanced with string template literals.
- Zx 8.0
- Google ZX – A tool for writing better scripts
-
Dax – Cross-platform shell for Node.js
TIL about zx! https://github.com/google/zx
This suite of tools feels indispensable. Anything to keep me from having to write/maintain bash scripts that are more than a series of commands.
-
The Bun Shell
Great point! According to https://github.com/oven-sh/bun/blob/b433beb016470b87850f3c01..., Bun Shell took inspiration from zx[0], dax[1] and bnx[2]
[0]: https://github.com/google/zx
[1]: https://github.com/dsherret/dax
[2]: https://github.com/wobsoriano/bnx
- Zx: A tool for writing better scritps
-
My script to install husky, commitlint and lint-staged with zx
If you want test it, you can run this script withzx :
-
YavaScript: Write shell scripts in JavaScript/TS instead of bash
I really love writing with zx. https://github.com/google/zx
We have some folks who have gone wild copy-pasting random fancy bash snippets into various developer helpers scripts. Zx did like 90% of that stuff out of the box, without being a pile of chaotic custom bash.
-
Scripting with Go: A Modest Proposal
I ended up using this for my cli scripting needs. https://github.com/google/zx
- And forget about shell scripting in /bin/sh ... I hate to say it, but, this is the middle of 2021 we have react and svelte we need more /etc/shells, we need modern languages all over, we can't do this anymore
What are some alternatives?
sh - Python process launching
shelljs - :shell: Portable Unix shell commands for Node.js
proposal-symbols-as-weakmap-keys - Permit Symbols as keys in WeakMaps, entries in WeakSets and WeakRefs, and registered in FinalizationRegistries
execa - Process execution for humans
clii - Easily build a cli app.
Commander.js - node.js command-line interfaces made easy
proposal-array-find-from-last - Proposal for Array.prototype.findLast and Array.prototype.findLastIndex.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
proposal-object-pick-or-omit - Ergonomic Dynamic Object Restructuring. [Moved to: https://github.com/tc39/proposal-object-pick-or-omit]
oclif - CLI for generating, building, and releasing oclif CLIs. Built by Salesforce.
deno - A modern runtime for JavaScript and TypeScript.
xonsh - :shell: Python-powered, cross-platform, Unix-gazing shell.