google/zx

JavaScriptgoogle.github.io/zx/

A tool for writing better scripts

javascriptnodejsshellbashclichild-processexecpipespawn
Crescimento de estrelas
Estrelas
45.7k
Forks
1.3k
Crescimento semanal
+13
Issues
19
10k20k30k40k
mai. de 2021fev. de 2023nov. de 2024set. de 2026
Artefatosnpm
README

Zx logo zx

#!/usr/bin/env zx

await $`cat package.json | grep name`

const branch = await $`git branch --show-current`
await $`dep deploy --branch=${branch}`

await Promise.all([
  $`sleep 1; echo 1`,
  $`sleep 2; echo 2`,
  $`sleep 3; echo 3`,
])

const name = 'foo bar'
await $`mkdir /tmp/${name}`

Bash is great, but when it comes to writing more complex scripts, many people prefer a more convenient programming language. JavaScript is a perfect choice, but the Node.js standard library requires additional hassle before using. No compromise, take the best of both. The zx package provides useful cross-platform wrappers around child_process, escapes arguments and gives sensible defaults.

Install

npm install zx

All setup options: zx/setup. See also zx@lite.

Usage

Compatibility

See also

  • MAML — JSON for config, with comments, multiline strings, unquoted keys, and optional commas.

License

Apache-2.0

Disclaimer: This is not an officially supported Google product.

Repositórios relacionados
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

TypeScriptnpmtutorialBSD 3-Clause "New" or "Revised" Licenselearn-to-codenonprofits
contribute.freecodecamp.org
455.1k46.1k
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPItutorialMIT Licensetutorialproject
282.4k36.2k
react/react

The library for web and native user interfaces.

JavaScriptnpmlibraryMIT Licensejavascriptreact
react.dev
249.2k51.3k
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

TypeScriptnpmlibraryMIT Licensevuejavascript
v2.vuejs.org
211.6k33.7k
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

JavaScriptnpminterviewMIT Licensejavascriptalgorithms
196.6k31k
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

tutorialOtherbook-seriesjavascript
amazon.com/dp/B085XXCJ7X
184.8k33.4k
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

MDXMIT Licensecssbootstrap
getbootstrap.com
174.7k78.6k
airbnb/javascript

JavaScript Style Guide

JavaScriptnpmlibraryMIT Licensejavascripteslint
148.2k26.6k
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

JavaScriptnpmawesomeCreative Commons Attribution 4.0 Internationalawesome-listjavascript
30secondsofcode.org
129k12.5k
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

C++appMIT Licenseelectronjavascript
electronjs.org
122.9k17.5k
nodejs/node

Node.js JavaScript runtime ✨🐢🚀✨

JavaScriptnpmOthernodejsjavascript
nodejs.org
120.7k36.7k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

awesomeGNU General Public License v3.0pythonjavascript
weibo.com/justjavac
118.7k28.3k