From f193be5d011176366d3c14125a44a5f14be2dd18 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:25:54 +0300 Subject: [PATCH] google.com/zx (#3562) * new file: projects/google.com/zx/package.yml new file: projects/google.com/zx/test.mjs * fixes --------- Co-authored-by: Jacob Heider --- projects/google.com/zx/package.yml | 30 ++++++++++++++++++++++++++++++ projects/google.com/zx/test.mjs | 5 +++++ 2 files changed, 35 insertions(+) create mode 100644 projects/google.com/zx/package.yml create mode 100644 projects/google.com/zx/test.mjs diff --git a/projects/google.com/zx/package.yml b/projects/google.com/zx/package.yml new file mode 100644 index 00000000..27e971e3 --- /dev/null +++ b/projects/google.com/zx/package.yml @@ -0,0 +1,30 @@ +distributable: ~ +display-name: zx +versions: + github: google/zx/tags +dependencies: + nodejs.org: '*' +build: + dependencies: + npmjs.com: '*' + curl.se: '*' + script: + - curl -L https://registry.npmjs.org/zx/-/zx-{{version}}.tgz --output zx-{{version}}.tgz + - npm i $ARGS + - run: ln -s ../libexec/bin/zx zx + working-directory: "{{prefix}}/bin" + env: + ARGS: + - -ddd + - --global + - --build-from-source + - --prefix={{prefix}}/libexec + - --unsafe-perm + - zx-{{version}}.tgz +provides: + - bin/zx +test: + script: + - zx --version | grep {{version}} + - zx test.mjs | grep "name is bar" + - ls | grep bar diff --git a/projects/google.com/zx/test.mjs b/projects/google.com/zx/test.mjs new file mode 100644 index 00000000..d9acbafe --- /dev/null +++ b/projects/google.com/zx/test.mjs @@ -0,0 +1,5 @@ +#!/usr/bin/env zx + +let name = YAML.parse('foo: bar').foo +console.log(`name is ${name}`) +await $`touch ${name}` \ No newline at end of file