Skip to content

Instantly share code, notes, and snippets.

@BBlackwo
Forked from zkat/index.js
Last active July 25, 2018 05:10
Show Gist options
  • Save BBlackwo/c19da1972b8f3ac0a3f18b9a3612d22c to your computer and use it in GitHub Desktop.
Save BBlackwo/c19da1972b8f3ac0a3f18b9a3612d22c to your computer and use it in GitHub Desktop.

Revisions

  1. BBlackwo revised this gist Jul 25, 2018. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion index.js
    Original file line number Diff line number Diff line change
    @@ -3,4 +3,7 @@
    console.log('yay gist');

    const { version, name } = require('./package.json');
    console.log(version, name);
    console.log(version, name);

    console.log(process.cwd());
    console.log(__dirname);
  2. BBlackwo revised this gist Jul 25, 2018. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion index.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    #!/usr/bin/env node

    console.log('yay gist')
    console.log('yay gist');

    const { version, name } = require('./package.json');
    console.log(version, name);
  3. @zkat zkat revised this gist Jun 27, 2017. 3 changed files with 4 additions and 4 deletions.
    3 changes: 0 additions & 3 deletions bin.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +0,0 @@
    #!/bin/bash

    echo "This is actual bash code I'm running here lol"
    3 changes: 3 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    #!/usr/bin/env node

    console.log('yay gist')
    2 changes: 1 addition & 1 deletion package.json
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    {"name": "npx-is-cool", "version": "0.0.0", "bin": "./bin.sh"}
    {"name": "npx-is-cool", "version": "0.0.0", "bin": "./index.js"}
  4. @zkat zkat revised this gist Jun 27, 2017. 3 changed files with 4 additions and 3 deletions.
    3 changes: 3 additions & 0 deletions bin.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    #!/bin/bash

    echo "This is actual bash code I'm running here lol"
    2 changes: 0 additions & 2 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -1,2 +0,0 @@
    #!/usr/bin/env node
    console.log('this code was executed straight off a gist')
    2 changes: 1 addition & 1 deletion package.json
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    {"name": "npx-is-cool", "version": "0.0.0", "bin": "./index.js"}
    {"name": "npx-is-cool", "version": "0.0.0", "bin": "./bin.sh"}
  5. @zkat zkat revised this gist Jun 27, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -1 +1,2 @@
    #!/usr/bin/env node
    console.log('this code was executed straight off a gist')
  6. @zkat zkat created this gist Jun 27, 2017.
    1 change: 1 addition & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    console.log('this code was executed straight off a gist')
    1 change: 1 addition & 0 deletions package.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    {"name": "npx-is-cool", "version": "0.0.0", "bin": "./index.js"}
    3 changes: 3 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    Hi!

    try passing the URL for this gist to `npx`.