...**/!(*.map|*.min.js)Size
Gzip
Dependencies
Publish
Install
Size
Gzip
Dependencies
@@ -1,11 +1,24 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "name": "about", |
| 3 | "version": "1.0.0", | |
| 4 | "description": "About the platform.", | |
| 5 | "main": "index.js", | |
| 3 | "version": "2.0.0", | |
| 4 | "description": "Your about page in the terminal", | |
| 5 | "main": "dist/index.js", | |
| 6 | 6 | "scripts": { |
| 7 | 7 | "test": "echo \"Error: no test specified\" && exit 1" |
| 8 | 8 | }, |
| 9 | "author": "Sorin Iclanzan <sorin@iclanzan.com> (http://iclanzan.com/)", | |
| 10 | "license": "MIT" | |
| 9 | "keywords": [], | |
| 10 | "author": "", | |
| 11 | "license": "ISC", | |
| 12 | "devDependencies": { | |
| 13 | "@types/minimist": "^1.2.0", | |
| 14 | "@types/node": "^13.1.7", | |
| 15 | "@types/react": "^16.9.17", | |
| 16 | "typescript": "^3.7.4" | |
| 17 | }, | |
| 18 | "dependencies": { | |
| 19 | "ink": "^2.6.0", | |
| 20 | "minimist": "^1.2.0", | |
| 21 | "react": "^16.12.0", | |
| 22 | "terminal-image": "^0.2.0" | |
| 23 | } | |
| 11 | 24 | } |
@@ -0,0 +1,9 @@ | ||
| 1 | MIT License | |
| 2 | ||
| 3 | Copyright (c) Xiaoru Li | |
| 4 | ||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| 6 | ||
| 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| 8 | ||
| 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
@@ -0,0 +1,25 @@ | ||
| 1 | "use strict"; | |
| 2 | Object.defineProperty(exports, "__esModule", { value: true }); | |
| 3 | exports.default = { | |
| 4 | name: "Xiaoru Li", | |
| 5 | about: "Xiaoru aka Leo is a CS student and a software engineer based in Germany who loves learning and sharing knowledge. In his free time, he pretends to be a musician and enjoys writing random music tunes.", | |
| 6 | links: [ | |
| 7 | { | |
| 8 | label: "Website", | |
| 9 | url: "https://xiaoru.li", | |
| 10 | }, | |
| 11 | { | |
| 12 | label: "Twitter", | |
| 13 | url: "https://twitter.com/hexrcs", | |
| 14 | }, | |
| 15 | { | |
| 16 | label: "GitHub", | |
| 17 | url: "https://github.com/hexrcs", | |
| 18 | }, | |
| 19 | { | |
| 20 | label: "Blog", | |
| 21 | url: "https://dev.to/hexrcs", | |
| 22 | }, | |
| 23 | ], | |
| 24 | }; | |
| 25 | //# sourceMappingURL=hexrcs.js.map | |
@@ -0,0 +1,48 @@ | ||
| 1 | #!/usr/bin/env node | |
| 2 | "use strict"; | |
| 3 | var __importDefault = (this && this.__importDefault) || function (mod) { | |
| 4 | return (mod && mod.__esModule) ? mod : { "default": mod }; | |
| 5 | }; | |
| 6 | Object.defineProperty(exports, "__esModule", { value: true }); | |
| 7 | const react_1 = __importDefault(require("react")); | |
| 8 | const ink_1 = require("ink"); | |
| 9 | console.log("This app is still WIP!\n\n"); | |
| 10 | // testing dummies | |
| 11 | const hexrcs_json_1 = __importDefault(require("./profiles/hexrcs.json")); | |
| 12 | function main() { | |
| 13 | const args = process.argv.slice(2); | |
| 14 | let root; | |
| 15 | if (args.find(x => x === "-h" || x === "--help")) { | |
| 16 | if (args.length === 1) { | |
| 17 | root = react_1.default.createElement(Help, null); | |
| 18 | } | |
| 19 | else { | |
| 20 | root = react_1.default.createElement(Invalid, null); | |
| 21 | } | |
| 22 | } | |
| 23 | else if (args.length === 0) { | |
| 24 | root = react_1.default.createElement(Help, null); | |
| 25 | } | |
| 26 | else { | |
| 27 | root = react_1.default.createElement(App, { profile: hexrcs_json_1.default }); | |
| 28 | } | |
| 29 | ink_1.render(root); | |
| 30 | } | |
| 31 | const Help = () => react_1.default.createElement(ink_1.Text, null, "Help page"); | |
| 32 | const Invalid = () => react_1.default.createElement(ink_1.Text, null, "Invalid arguments!"); | |
| 33 | const App = ({ profile }) => { | |
| 34 | // TODO: the list should be generated | |
| 35 | // also should we use real names (can be long and space separated) or use handles? | |
| 36 | // shouldn't be a problem when later we have a server and whatnot | |
| 37 | var _a; | |
| 38 | return (react_1.default.createElement(ink_1.Box, { flexDirection: "column" }, | |
| 39 | react_1.default.createElement(ink_1.Text, { bold: true }, profile.name), | |
| 40 | react_1.default.createElement(ink_1.Text, null, " "), | |
| 41 | react_1.default.createElement(ink_1.Text, null, profile.about), | |
| 42 | react_1.default.createElement(ink_1.Text, null, " "), (_a = profile.links) === null || _a === void 0 ? void 0 : | |
| 43 | _a.map((x, i) => (react_1.default.createElement(ink_1.Text, { key: i }, | |
| 44 | "- ", | |
| 45 | x.label))))); | |
| 46 | }; | |
| 47 | main(); | |
| 48 | //# sourceMappingURL=index.js.map | |
@@ -0,0 +1,22 @@ | ||
| 1 | { | |
| 2 | "name": "Xiaoru Li", | |
| 3 | "about": "Xiaoru aka Leo is a CS student and a software engineer based in Germany who loves learning and sharing knowledge. In his free time, he pretends to be a musician and enjoys writing random music tunes.", | |
| 4 | "links": [ | |
| 5 | { | |
| 6 | "label": "Website", | |
| 7 | "url": "https://xiaoru.li" | |
| 8 | }, | |
| 9 | { | |
| 10 | "label": "Twitter", | |
| 11 | "url": "https://twitter.com/hexrcs" | |
| 12 | }, | |
| 13 | { | |
| 14 | "label": "GitHub", | |
| 15 | "url": "https://github.com/hexrcs" | |
| 16 | }, | |
| 17 | { | |
| 18 | "label": "Blog", | |
| 19 | "url": "https://dev.to/hexrcs" | |
| 20 | } | |
| 21 | ] | |
| 22 | } | |
@@ -0,0 +1,22 @@ | ||
| 1 | { | |
| 2 | "name": "Xiaoru Li", | |
| 3 | "about": "Xiaoru aka Leo is a CS student and a software engineer based in Germany who loves learning and sharing knowledge. In his free time, he pretends to be a musician and enjoys writing random music tunes.", | |
| 4 | "links": [ | |
| 5 | { | |
| 6 | "label": "Website", | |
| 7 | "url": "https://xiaoru.li" | |
| 8 | }, | |
| 9 | { | |
| 10 | "label": "Twitter", | |
| 11 | "url": "https://twitter.com/hexrcs" | |
| 12 | }, | |
| 13 | { | |
| 14 | "label": "GitHub", | |
| 15 | "url": "https://github.com/hexrcs" | |
| 16 | }, | |
| 17 | { | |
| 18 | "label": "Blog", | |
| 19 | "url": "https://dev.to/hexrcs" | |
| 20 | } | |
| 21 | ] | |
| 22 | } | |
@@ -0,0 +1,22 @@ | ||
| 1 | { | |
| 2 | "name": "Your Name", | |
| 3 | "about": "Your Name is awesome ;)", | |
| 4 | "links": [ | |
| 5 | { | |
| 6 | "label": "Website", | |
| 7 | "url": "https://example.com" | |
| 8 | }, | |
| 9 | { | |
| 10 | "label": "Twitter", | |
| 11 | "url": "https://twitter.com/" | |
| 12 | }, | |
| 13 | { | |
| 14 | "label": "GitHub", | |
| 15 | "url": "https://github.com/" | |
| 16 | }, | |
| 17 | { | |
| 18 | "label": "Blog", | |
| 19 | "url": "https://dev.to/" | |
| 20 | } | |
| 21 | ] | |
| 22 | } | |
@@ -0,0 +1,22 @@ | ||
| 1 | { | |
| 2 | "name": "Your Name", | |
| 3 | "about": "Your Name is awesome ;)", | |
| 4 | "links": [ | |
| 5 | { | |
| 6 | "label": "Website", | |
| 7 | "url": "https://example.com" | |
| 8 | }, | |
| 9 | { | |
| 10 | "label": "Twitter", | |
| 11 | "url": "https://twitter.com/" | |
| 12 | }, | |
| 13 | { | |
| 14 | "label": "GitHub", | |
| 15 | "url": "https://github.com/" | |
| 16 | }, | |
| 17 | { | |
| 18 | "label": "Blog", | |
| 19 | "url": "https://dev.to/" | |
| 20 | } | |
| 21 | ] | |
| 22 | } | |
@@ -0,0 +1,21 @@ | ||
| 1 | { | |
| 2 | "compilerOptions": { | |
| 3 | "target": "es2015", | |
| 4 | "module": "commonjs", | |
| 5 | "outDir": "./dist", | |
| 6 | "rootDir": "src", | |
| 7 | "strict": true, | |
| 8 | "jsx": "react", | |
| 9 | "strictNullChecks": true, | |
| 10 | "declaration": true, | |
| 11 | "sourceMap": true, | |
| 12 | "noImplicitReturns": true, | |
| 13 | "noFallthroughCasesInSwitch": true, | |
| 14 | "esModuleInterop": true, | |
| 15 | "skipLibCheck": true, | |
| 16 | "experimentalDecorators": true, | |
| 17 | "resolveJsonModule": true | |
| 18 | }, | |
| 19 | "include": ["src"], | |
| 20 | "exclude": ["node_modules", "**/*.spec.ts"] | |
| 21 | } | |
@@ -0,0 +1,30 @@ | ||
| 1 | # About | |
| 2 | ||
| 3 | Your about page in the terminal. | |
| 4 | ||
| 5 | ## What is this? | |
| 6 | ||
| 7 | ## Usage | |
| 8 | ||
| 9 | If you don't have your profile set up yet, fork this project, add yours in `./src/profiles/` and submit a pull request! | |
| 10 | ||
| 11 | If you have already published your profile, just ask your friends to install Node.js and run: | |
| 12 | ||
| 13 | ```bash | |
| 14 | $ npx about Your Name Here | |
| 15 | ``` | |
| 16 | ||
| 17 | ## Built with | |
| 18 | ||
| 19 | - [`ink`](https://github.com/vadimdemedes/ink) - React for interactive command-line apps | |
| 20 | - [`terminal-image`](https://github.com/sindresorhus/terminal-image) - Display images in the terminal | |
| 21 | ||
| 22 | ## About the Profile Creating Process | |
| 23 | ||
| 24 | Right now all profile creation and changes are submitted as PRs and are reviewed manually, but eventually I'll set up a web app and move all the profiles to a database. | |
| 25 | ||
| 26 | I'll try my best, however, I cannot guarantee to be always available for reviewing the changes. | |
| 27 | ||
| 28 | ## Thanks | |
| 29 | ||
| 30 | This project is inspired by [Sindre Sorhus](https://github.com/sindresorhus)'s [Sindre Sorhus CLI](https://github.com/sindresorhus/sindresorhus), and wouldn't be possible without the Ink library from [Vadim Demedes](https://github.com/vadimdemedes) and Sindre. | |
@@ -0,0 +1,61 @@ | ||
| 1 | #!/usr/bin/env node | |
| 2 | ||
| 3 | import React from "react"; | |
| 4 | import { render, Box, Text } from "ink"; | |
| 5 | ||
| 6 | console.log("This app is still WIP!\n\n"); | |
| 7 | ||
| 8 | // testing dummies | |
| 9 | import hexrcs from "./profiles/hexrcs.json"; | |
| 10 | import template from "./profiles/template.json"; | |
| 11 | ||
| 12 | function main() { | |
| 13 | const args = process.argv.slice(2); | |
| 14 | let root; | |
| 15 | if (args.find(x => x === "-h" || x === "--help")) { | |
| 16 | if (args.length === 1) { | |
| 17 | root = <Help />; | |
| 18 | } else { | |
| 19 | root = <Invalid />; | |
| 20 | } | |
| 21 | } else if (args.length === 0) { | |
| 22 | root = <Help />; | |
| 23 | } else { | |
| 24 | root = <App profile={hexrcs} />; | |
| 25 | } | |
| 26 | ||
| 27 | render(root); | |
| 28 | } | |
| 29 | ||
| 30 | type AppProps = { | |
| 31 | profile: { | |
| 32 | name: string; | |
| 33 | about: string; | |
| 34 | links?: { | |
| 35 | label: string; | |
| 36 | url: string; | |
| 37 | }[]; | |
| 38 | }; | |
| 39 | }; | |
| 40 | ||
| 41 | const Help = () => <Text>Help page</Text>; | |
| 42 | const Invalid = () => <Text>Invalid arguments!</Text>; | |
| 43 | const App = ({ profile }: AppProps) => { | |
| 44 | // TODO: the list should be generated | |
| 45 | // also should we use real names (can be long and space separated) or use handles? | |
| 46 | // shouldn't be a problem when later we have a server and whatnot | |
| 47 | ||
| 48 | return ( | |
| 49 | <Box flexDirection={"column"}> | |
| 50 | <Text bold>{profile.name}</Text> | |
| 51 | <Text> </Text> | |
| 52 | <Text>{profile.about}</Text> | |
| 53 | <Text> </Text> | |
| 54 | {profile.links?.map((x, i) => ( | |
| 55 | <Text key={i}>- {x.label}</Text> | |
| 56 | ))} | |
| 57 | </Box> | |
| 58 | ); | |
| 59 | }; | |
| 60 | ||
| 61 | main(); | |