Skip to content

Commit e331f99

Browse files
committed
feat: πŸ”₯πŸ”₯πŸ”₯ release 1.0.0
1 parent 96e79ed commit e331f99

34 files changed

+5062
-0
lines changed

β€Ž.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
max_line_length = 100
10+
indent_size = 2
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

β€Ž.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
63+
.idea
64+
dist

β€Ž.npmignore

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Node template
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Directory for instrumented libs generated by jscoverage/JSCover
17+
lib-cov
18+
19+
# Coverage directory used by tools like istanbul
20+
coverage
21+
22+
# nyc test coverage
23+
.nyc_output
24+
25+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26+
.grunt
27+
28+
# Bower dependency directory (https://bower.io/)
29+
bower_components
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (https://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# TypeScript v1 declaration files
42+
typings/
43+
44+
# Optional npm cache directory
45+
.npm
46+
47+
# Optional eslint cache
48+
.eslintcache
49+
50+
# Optional REPL history
51+
.node_repl_history
52+
53+
# Output of 'npm pack'
54+
*.tgz
55+
56+
# Yarn Integrity file
57+
.yarn-integrity
58+
59+
# dotenv environment variables file
60+
.env
61+
62+
# next.js build output
63+
.next
64+
65+
lib/
66+
docs
67+
typedoc.js
68+
69+
.idea

β€Ž.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
access=public
2+
save-exact=true

β€Ž.prettierrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"tabWidth": 2,
3+
"bracketSpacing": true,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true,
7+
"trailingComma": "es5",
8+
"arrowParens": "always",
9+
"printWidth": 80
10+
}

β€ŽCHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4+
5+
<a name="1.0.0"></a>
6+
# 1.0.0 (2018-07-26)
7+
8+
9+
### Features
10+
11+
* πŸ”₯πŸ”₯πŸ”₯ release 1.0.0 ([6dcce26](https://github.com/dimabory/ecoji-js/commit/6dcce26))

β€Žbin/cli.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env node
2+
3+
const ecoji = require('../dist/index')
4+
const stdin = require('get-stdin')
5+
6+
stdin().then(input => {
7+
8+
if (argv.d) {
9+
try {
10+
process.stdout.write(ecoji.default.decode(input.toString()))
11+
} catch (e) {
12+
process.stderr.write('You have provided incorrect data')
13+
console.error(e)
14+
}
15+
process.stdout.write('\n')
16+
} else {
17+
process.stdout.write(ecoji.default.encode(input))
18+
process.stdout.write('\n')
19+
}
20+
21+
})
22+
23+
const argv = require('yargs')
24+
.usage(`Usage: $0 [-d]
25+
26+
\Encode or decode data as Unicode emojis. 😁`)
27+
28+
.example('echo -n 123 | ./bin/ecoji')
29+
.example('echo πŸŽŒπŸšŸπŸŽˆβ˜• | ./bin/ecoji -d')
30+
31+
.command('-d', 'decode emoji to string')
32+
33+
.option('d', {
34+
alias: 'decode',
35+
describe: 'decode data',
36+
type: 'boolean',
37+
default: false,
38+
})
39+
40+
.version()
41+
.alias('version', 'v')
42+
43+
.help()
44+
.alias('help', 'h')
45+
.argv
46+

0 commit comments

Comments
Β (0)