kxrt 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Stefan Natter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ It's me, Stefan!
2
+
3
+ # Usage
4
+
5
+ ```bash
6
+ npx natterstefan
7
+ ```
8
+
9
+ # Credit
10
+
11
+ Forked from [@bitandbang](https://twitter.com/bitandbang/status/1075473070368919552)
12
+ ([repo](https://github.com/bnb/bitandbang)) via [@mxstbr](https://github.com/mxstbr/)
package/bin/card.js ADDED
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ // 👆 Used to tell Node.js that this is a CLI tool
3
+
4
+ // Pull in our modules
5
+ const chalk = require('chalk')
6
+ const boxen = require('boxen')
7
+
8
+ // Define options for Boxen
9
+ const options = {
10
+ padding: 1,
11
+ margin: 1,
12
+ borderStyle: 'round',
13
+ }
14
+
15
+ // Text + chalk definitions
16
+ const data = {
17
+ name: chalk.white('Kartikeya'),
18
+ handle: chalk.cyan('@kxrt'),
19
+ labelWork: chalk.white.bold(' Work:'),
20
+ work: chalk.white('Student, National University of Singapore'),
21
+ labelGitHub: chalk.white.bold(' GitHub:'),
22
+ github: chalk.cyan('https://github.com/kxrt'),
23
+ labelLinkedIn: chalk.white.bold(' LinkedIn:'),
24
+ linkedin: chalk.cyan('https://linkedin.com/in/kvrtikeya'),
25
+ labelWeb: chalk.white.bold(' Web:'),
26
+ web: chalk.cyan('https://kxrt.github.io'),
27
+ labelCard: chalk.white.bold(' Card:'),
28
+ npx: chalk.white('npx kxrt'),
29
+ }
30
+
31
+ // Actual strings we're going to output
32
+ const newline = '\n'
33
+ const heading = `${data.name} / ${data.handle}`
34
+ const working = `${data.labelWork} ${data.work}`
35
+ const twittering = `${data.labelTwitter} ${data.twitter}`
36
+ const githubing = `${data.labelGitHub} ${data.github}`
37
+ const linkedining = `${data.labelLinkedIn} ${data.linkedin}`
38
+ const webing = `${data.labelWeb} ${data.web}`
39
+ const carding = `${data.labelCard} ${data.npx}`
40
+
41
+ // Put all our output together into a single variable so we can use boxen
42
+ // effectively
43
+ const output =
44
+ heading +
45
+ newline +
46
+ newline +
47
+ working +
48
+ newline +
49
+ twittering +
50
+ newline +
51
+ githubing +
52
+ newline +
53
+ linkedining +
54
+ newline +
55
+ webing +
56
+ newline +
57
+ newline +
58
+ carding
59
+
60
+ console.log(chalk.green(boxen(output, options)))
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "kxrt",
3
- "version": "1.0.1",
4
- "description": "",
5
- "main": "index.js",
3
+ "version": "1.1.0",
4
+ "description": "Kartikeya's business card",
5
+ "main": "./bin/card.js",
6
+ "bin": {
7
+ "kxrt": "./bin/card.js"
8
+ },
6
9
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "test": "echo \"Error: no test specified\" && exit 0"
8
11
  },
9
12
  "keywords": [],
10
- "author": "",
11
- "license": "ISC",
12
- "bin": "./cli.js"
13
+ "author": "Kartikeya",
14
+ "license": "MIT",
15
+ "dependencies": {
16
+ "boxen": "^5.0.0",
17
+ "chalk": "^4.1.0"
18
+ }
13
19
  }
package/cli.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- console.log('kart')