Skip to content

Instantly share code, notes, and snippets.

@kazuma1989
Created November 17, 2019 04:42
Show Gist options
  • Save kazuma1989/99bd0684a96c11c76c722ac69ec71b20 to your computer and use it in GitHub Desktop.
Save kazuma1989/99bd0684a96c11c76c722ac69ec71b20 to your computer and use it in GitHub Desktop.
Scaffold
#!/usr/bin/env node
const tar = require("tar");
async function scaffold(file) {
await tar.extract({
strip: 1,
file
});
console.log("finished");
};
const [, , file] = process.argv;
scaffold(file);
{
"name": "@kazuma1989/scaffold",
"version": "0.0.1",
"description": "",
"bin": "cli.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"scaffold",
"scaffolding"
],
"author": "kazuma1989 <funifuni.1204@gmail.com>",
"license": "MIT",
"dependencies": {
"tar": "^5.0.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment