Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyy committed Jan 5, 2021
0 parents commit 19e4215
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.idea/
/node_modules/
3 changes: 3 additions & 0 deletions cf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"max": 160
}
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const clipboardy = require('clipboardy');
require('crypto').randomBytes(128, function(err, buffer) {
const token = buffer.toString('hex');
clipboardy.write(token);
});
169 changes: 169 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@ng.huyy/shortcode",
"version": "1.0.1",
"description": "",
"author": "Huy Nguyen<github.com/nghuyy>",
"license": "MIT",
"bin": {
"tinybuild": "./tinybuild"
},
"preferGlobal": true,
"scripts": {
},
"dependencies": {
"clipboardy": "^2.3.0"
}
}
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Shortcode Generate
```shell script
npm install @ng.huyy/shortcode -g
```

6 changes: 6 additions & 0 deletions shortcode
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env node

/**
* Module dependencies.
*/
require('./index');

0 comments on commit 19e4215

Please sign in to comment.