Skip to content

Instantly share code, notes, and snippets.

@fcamblor
Last active July 6, 2021 00:49
Show Gist options
  • Select an option

  • Save fcamblor/9f96424f675537df36c903abc54feb92 to your computer and use it in GitHub Desktop.

Select an option

Save fcamblor/9f96424f675537df36c903abc54feb92 to your computer and use it in GitHub Desktop.

Revisions

  1. fcamblor revised this gist Jul 6, 2021. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions npm-install.mjs
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,5 @@
    #!/usr/bin/env zx

    import 'zx'

    void async function() {
    await $`curl -sSL https://raw.githubusercontent.com/fcamblor/bitrise-zx-scripts/main/index.mjs > /tmp/index.mjs`
    const {config, cacheableCommand} = await import('/tmp/index.mjs');
  2. fcamblor revised this gist Jul 6, 2021. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions npm-install.mjs
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,18 @@
    #!/usr/bin/env zx

    const {config, cacheableCommand} = await import('https://raw.githubusercontent.com/fcamblor/bitrise-zx-scripts/main/index.mjs');

    config(process);
    import 'zx'

    void async function() {
    await $`curl -sSL https://raw.githubusercontent.com/fcamblor/bitrise-zx-scripts/main/index.mjs > /tmp/index.mjs`
    const {config, cacheableCommand} = await import('/tmp/index.mjs');

    config(process);

    await cacheableCommand({
    cacheName:'npm-packages',
    cacheName:'cma-npm-packages',
    cachedPaths: ['node_modules'],
    compressContent: true,
    checksumCommand: () => $`md5 -q package.json`
    }, () => $`npm install`);
    }()

  3. fcamblor revised this gist Jul 6, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion npm-install.mjs
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/usr/bin/env zx

    import {config, cacheableCommand} from 'https://raw.githubusercontent.com/fcamblor/bitrise-zx-scripts/main/index.mjs';
    const {config, cacheableCommand} = await import('https://raw.githubusercontent.com/fcamblor/bitrise-zx-scripts/main/index.mjs');

    config(process);

  4. fcamblor created this gist Jul 6, 2021.
    14 changes: 14 additions & 0 deletions npm-install.mjs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/usr/bin/env zx

    import {config, cacheableCommand} from 'https://raw.githubusercontent.com/fcamblor/bitrise-zx-scripts/main/index.mjs';

    config(process);

    void async function() {
    await cacheableCommand({
    cacheName:'npm-packages',
    cachedPaths: ['node_modules'],
    compressContent: true,
    checksumCommand: () => $`md5 -q package.json`
    }, () => $`npm install`);
    }()