Last active
October 31, 2020 11:18
-
-
Save tk3/dcfd6e159f4fad048c10f5537949985d to your computer and use it in GitHub Desktop.
npx script from gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const fs = require('fs'); | |
const { spawnSync } = require('child_process'); | |
console.log("Hello world"); | |
spawnSync('ls', ['-l'], { stdio: 'inherit' }); | |
const readmeText = `# title | |
## sub title | |
content | |
`; | |
fs.writeFileSync('README.md', readmeText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "npx-script-from-gist", | |
"version": "1.0.0", | |
"bin": "./index.js" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment