mirror of
https://github.com/jakejarvis/jakejarvis.git
synced 2025-04-26 12:18:28 -04:00
🐦 ➡️ 🦣
This commit is contained in:
parent
9dbfee018b
commit
283e9fbd25
@ -20,7 +20,7 @@ $ npx @jakejarvis/cli
|
|||||||
|
|
||||||
❯ 🏡 Website jarv.is
|
❯ 🏡 Website jarv.is
|
||||||
❯ 📬 Email jake@jarv.is
|
❯ 📬 Email jake@jarv.is
|
||||||
❯ 🐦 Twitter @jakejarvis
|
❯ 🦣 Mastodon fediverse.jarv.is/@jake
|
||||||
❯ 📱 SMS +1 (617) 917-3737
|
❯ 📱 SMS +1 (617) 917-3737
|
||||||
❯ 🔐 PGP Key jrvs.io/key (2B0C 9CF2 51E6 9A39)
|
❯ 🔐 PGP Key jrvs.io/key (2B0C 9CF2 51E6 9A39)
|
||||||
```
|
```
|
||||||
|
12
cli/build.js
12
cli/build.js
@ -1,5 +1,5 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs/promises";
|
import { writeFile, stat } from "fs/promises";
|
||||||
import cpy from "cpy";
|
import cpy from "cpy";
|
||||||
import mkdirp from "mkdirp";
|
import mkdirp from "mkdirp";
|
||||||
import { transformFileSync } from "@babel/core";
|
import { transformFileSync } from "@babel/core";
|
||||||
@ -28,7 +28,7 @@ const { code: babelCode } = transformFileSync(inputFile, {
|
|||||||
await temporaryDirectoryTask(async (tempPath) => {
|
await temporaryDirectoryTask(async (tempPath) => {
|
||||||
// save babel-ified code above to a temporary file -- unfortunately, we can't pipe this code directly into to ncc
|
// save babel-ified code above to a temporary file -- unfortunately, we can't pipe this code directly into to ncc
|
||||||
const babelFile = path.join(tempPath, "index.cjs");
|
const babelFile = path.join(tempPath, "index.cjs");
|
||||||
await fs.writeFile(babelFile, babelCode);
|
await writeFile(babelFile, babelCode);
|
||||||
|
|
||||||
// hacky warning: ncc needs the node_modules we want to bundle next to the input file, so copy them from here
|
// hacky warning: ncc needs the node_modules we want to bundle next to the input file, so copy them from here
|
||||||
await cpy("node_modules/**", path.join(tempPath, "node_modules"));
|
await cpy("node_modules/**", path.join(tempPath, "node_modules"));
|
||||||
@ -46,14 +46,14 @@ await temporaryDirectoryTask(async (tempPath) => {
|
|||||||
|
|
||||||
// write final build to ./dist and make it executable
|
// write final build to ./dist and make it executable
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
fs.writeFile(path.join(outputDir, "index.cjs"), code, { mode: 0o755 }),
|
writeFile(path.join(outputDir, "index.cjs"), code, { mode: 0o755 }),
|
||||||
// TODO: figure out if bundling this script from 'open' module is really necessary?
|
// TODO: figure out if bundling this script from 'open' module is really necessary?
|
||||||
// https://linux.die.net/man/1/xdg-open
|
// https://linux.die.net/man/1/xdg-open
|
||||||
fs.writeFile(path.join(outputDir, "xdg-open"), assets["xdg-open"].source, { mode: 0o755 }),
|
writeFile(path.join(outputDir, "xdg-open"), assets["xdg-open"].source, { mode: 0o755 }),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
// quick logging of resulting filesizes
|
// quick logging of resulting filesizes
|
||||||
console.log("🎉 Success!");
|
console.log("🎉 Success!");
|
||||||
console.log(`dist/index.cjs\t${prettyBytes((await fs.stat(path.join(outputDir, "index.cjs"))).size)}`);
|
console.log(`dist/index.cjs\t${prettyBytes((await stat(path.join(outputDir, "index.cjs"))).size)}`);
|
||||||
console.log(`dist/xdg-open\t${prettyBytes((await fs.stat(path.join(outputDir, "xdg-open"))).size)}`);
|
console.log(`dist/xdg-open\t${prettyBytes((await stat(path.join(outputDir, "xdg-open"))).size)}`);
|
||||||
|
@ -42,8 +42,12 @@ const items = createItems([
|
|||||||
url: "https://jarv.is/contact/",
|
url: "https://jarv.is/contact/",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "🐦 Twitter",
|
label: "📱 SMS",
|
||||||
url: "https://twitter.com/intent/user?screen_name=jakejarvis",
|
url: "sms:+1-617-917-3737",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "🐘 Mastodon",
|
||||||
|
url: "https://fediverse.jarv.is/@jake",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "🔐 PGP Key",
|
label: "🔐 PGP Key",
|
||||||
|
@ -30,15 +30,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.18.9",
|
"@babel/core": "^7.20.5",
|
||||||
"@babel/preset-react": "^7.18.6",
|
"@babel/preset-react": "^7.18.6",
|
||||||
"@jakejarvis/eslint-config": "*",
|
"@jakejarvis/eslint-config": "*",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/react": "^18.0.15",
|
"@types/react": "^18.0.25",
|
||||||
"@vercel/ncc": "^0.34.0",
|
"@vercel/ncc": "^0.34.0",
|
||||||
"cpy": "^9.0.1",
|
"cpy": "^9.0.1",
|
||||||
"eslint": "^8.20.0",
|
"eslint": "^8.28.0",
|
||||||
"eslint-plugin-react": "^7.30.1",
|
"eslint-plugin-react": "^7.31.11",
|
||||||
"ink": "^3.2.0",
|
"ink": "^3.2.0",
|
||||||
"ink-big-text": "^1.2.0",
|
"ink-big-text": "^1.2.0",
|
||||||
"ink-gradient": "^2.0.0",
|
"ink-gradient": "^2.0.0",
|
||||||
|
808
cli/yarn.lock
808
cli/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user