Skip to content

Commit e4a6c52

Browse files
committed
Merge branch 'master' of https://github.com/codingtools/cdt into feature/test-encryption-decryption-together
2 parents 0224de2 + 9bd6828 commit e4a6c52

35 files changed

+4451
-5214
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
command: npm test
2626
- run:
2727
name: Generate code coverage
28-
command: './node_modules/.bin/nyc report --reporter=text-lcov'
29-
- store_artifacts:
30-
path: test-results.xml
31-
prefix: tests
32-
- store_artifacts:
33-
path: coverage
34-
prefix: coverage
28+
command: ./node_modules/.bin/nyc report --reporter=json
29+
- run:
30+
name: moving report to right file
31+
command: mv coverage/coverage-final.json coverage/coverage.json
32+
- run:
33+
name: send code coverage to codecov
34+
command: ./node_modules/.bin/codecov
3535

3636
workflows:
3737
version: 2

.github/workflows/nodejs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: GithubCI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [10.x, 11.x, 12.x, 13.x]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- run: npm install
21+
- run: npm run build --if-present
22+
- run: npm test
23+
env:
24+
CI: true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
node_modules
99
/.idea
1010
cdt.iml
11+
**/.DS_Store
12+
output/*
13+
!output/.gitkeep
14+
coverage/*.json

README.md

Lines changed: 117 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
===
33
CLI for Developers
44

5+
[![GithubCI](https://github.com/codingtools/cdt/workflows/GithubCI/badge.svg)](https://github.com/codingtools/cdt/actions?query=workflow%3AGithubCI)
56
[![CircleCI](https://circleci.com/gh/codingtools/cdt/tree/release%2Frelease-v0.1.svg?style=shield)](https://circleci.com/gh/codingtools/cdt/tree/release%2Frelease-v0.1)
7+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/82d29e2a902a4c338228d636f290d9cd)](https://app.codacy.com/gh/codingtools/cdt?utm_source=github.com&utm_medium=referral&utm_content=codingtools/cdt&utm_campaign=Badge_Grade_Dashboard)
8+
[![codecov](https://codecov.io/gh/codingtools/cdt/branch/release%2Frelease-v0.1/graph/badge.svg)](https://codecov.io/gh/codingtools/cdt)
69
[![Version](https://img.shields.io/npm/v/@codingtools/cdt)](https://npmjs.org/package/@codingtools/cdt)
7-
![npm](https://img.shields.io/npm/dm/@codingtools/cdt)
8-
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/codingtools/cdt)](https://github.com/codingtools/cdt/graphs/commit-activity)
10+
![npm](https://img.shields.io/npm/dt/@codingtools/cdt)
11+
![node (scoped)](https://img.shields.io/node/v/@codingtools/cdt)[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/codingtools/cdt)](https://github.com/codingtools/cdt/graphs/commit-activity)
912
[![GitHub contributors](https://img.shields.io/github/contributors/codingtools/cdt)](https://github.com/codingtools/cdt/graphs/contributors)
1013
[![License](https://img.shields.io/npm/l/@codingtools/cdt)](https://github.com/codingtools/cdt/blob/master/package.json)
1114
[![Greenkeeper badge](https://badges.greenkeeper.io/codingtools/cdt.svg)](https://greenkeeper.io/)
@@ -37,7 +40,7 @@ $ npm install -g @codingtools/cdt
3740
$ cdt COMMAND
3841
running command...
3942
$ cdt (-v|--version|version)
40-
@codingtools/cdt/0.1.2 darwin-x64 node-v12.9.0
43+
@codingtools/cdt/0.1.6 darwin-x64 node-v12.9.0
4144
$ cdt --help [COMMAND]
4245
USAGE
4346
$ cdt COMMAND
@@ -46,11 +49,71 @@ USAGE
4649
<!-- usagestop -->
4750
# Commands
4851
<!-- commands -->
52+
* [`cdt autocomplete [SHELL]`](#cdt-autocomplete-shell)
53+
* [`cdt avro [COMMAND]`](#cdt-avro-command)
54+
* [`cdt bundlephobia [PACKAGE]`](#cdt-bundlephobia-package)
4955
* [`cdt crypto [STRING]`](#cdt-crypto-string)
56+
* [`cdt datetime [DATE]`](#cdt-datetime-date)
5057
* [`cdt hash [STRING]`](#cdt-hash-string)
5158
* [`cdt help [COMMAND]`](#cdt-help-command)
5259
* [`cdt minify [FILE]`](#cdt-minify-file)
5360

61+
## `cdt autocomplete [SHELL]`
62+
63+
display autocomplete installation instructions
64+
65+
```
66+
USAGE
67+
$ cdt autocomplete [SHELL]
68+
69+
ARGUMENTS
70+
SHELL shell type
71+
72+
OPTIONS
73+
-r, --refresh-cache Refresh cache (ignores displaying instructions)
74+
75+
EXAMPLES
76+
$ cdt autocomplete
77+
$ cdt autocomplete bash
78+
$ cdt autocomplete zsh
79+
$ cdt autocomplete --refresh-cache
80+
```
81+
82+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.1.4/src/commands/autocomplete/index.ts)_
83+
84+
## `cdt avro [COMMAND]`
85+
86+
Avro Utility command
87+
88+
```
89+
USAGE
90+
$ cdt avro [COMMAND]
91+
92+
OPTIONS
93+
-f, --file=file input file path
94+
-h, --help show CLI help
95+
-o, --output=output output file path
96+
-t, --schemaType=schemaType schema type file path
97+
```
98+
99+
_See code: [src/commands/avro.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/avro.ts)_
100+
101+
## `cdt bundlephobia [PACKAGE]`
102+
103+
Find cost of adding a npm/yarn packages or all dependencies in package.json file
104+
105+
```
106+
USAGE
107+
$ cdt bundlephobia [PACKAGE]
108+
109+
OPTIONS
110+
-f, --file=file path for package.json file
111+
-h, --help show CLI help
112+
-p, --packages=packages packages for which cost is required, can pass more than one separated by space
113+
```
114+
115+
_See code: [src/commands/bundlephobia.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/bundlephobia.ts)_
116+
54117
## `cdt crypto [STRING]`
55118

56119
Encryption and Decryption functionality for File/String
@@ -69,7 +132,25 @@ OPTIONS
69132
-s, --string=string string to be encrypted/decrypted
70133
```
71134

72-
_See code: [src/commands/crypto.ts](https://github.com/codingtools/cdt/blob/v0.1.2/src/commands/crypto.ts)_
135+
_See code: [src/commands/crypto.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/crypto.ts)_
136+
137+
## `cdt datetime [DATE]`
138+
139+
Date and Time utility
140+
141+
```
142+
USAGE
143+
$ cdt datetime [DATE]
144+
145+
OPTIONS
146+
-d, --date=date Datetime input string, default: Current Datetime, could also be passed through argument
147+
-f, --format=format Datetime format, default: Do MMMM YYYY, h:m:s A, Z UTC
148+
-h, --help show CLI help
149+
-l, --locale=locale Locale, default: en
150+
-z, --timezone=timezone Timezone for Datetime parsing, default: Your timezone
151+
```
152+
153+
_See code: [src/commands/datetime.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/datetime.ts)_
73154

74155
## `cdt hash [STRING]`
75156

@@ -80,13 +161,14 @@ USAGE
80161
$ cdt hash [STRING]
81162
82163
OPTIONS
83-
-f, --file=file file to be hashed
84-
-h, --help show CLI help
85-
-s, --string=string string to be hashed
86-
-t, --type=type type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160]
164+
-f, --file=file file to be hashed
165+
-h, --help show CLI help
166+
-o, --outputFile=outputFile output file path
167+
-s, --string=string string to be hashed
168+
-t, --type=type type of hash [SHA1(default), MD5, SHA256, SHA512, RMD160 or RIPEMD160]
87169
```
88170

89-
_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.2/src/commands/hash.ts)_
171+
_See code: [src/commands/hash.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/hash.ts)_
90172

91173
## `cdt help [COMMAND]`
92174

@@ -114,14 +196,24 @@ USAGE
114196
$ cdt minify [FILE]
115197
116198
OPTIONS
117-
-f, --file=file file to be minified
118-
-h, --help show CLI help
119-
-t, --type=type type of file to be minified, it will try to find type with extension
199+
-f, --file=file file to be minified
200+
-h, --help show CLI help
201+
-o, --outputFile=outputFile output file path
202+
203+
-t, --type=type type of file to be minified, it will try to find type with extension supported: JS,
204+
HTML/HTM, CSS
120205
```
121206

122-
_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.2/src/commands/minify.ts)_
207+
_See code: [src/commands/minify.ts](https://github.com/codingtools/cdt/blob/v0.1.6/src/commands/minify.ts)_
123208
<!-- commandsstop -->
124209

210+
## Acknowledgement
211+
* this cli uses following opensource libraries/services
212+
* [bundlephobia](https://bundlephobia.com/)
213+
* [avro-js](https://openbase.io/js/avro-js)
214+
* [avsc](https://github.com/mtth/avsc)
215+
216+
And many others, great thanks to all the people involved in developnment and support :)
125217

126218
## Contribution
127219

@@ -133,6 +225,18 @@ Please feel free to provide any suggestion for new utility in [Issues](https://g
133225

134226
This Project is created and supported by [Ashish Patel](http://ashish.live/)
135227

228+
## Releasing Version
229+
* this needs to be done from release* branch
230+
```bash
231+
npm version patch
232+
```
233+
it will update readme.md and update package.json, also will create tag and commit.
234+
235+
```bash
236+
npm publish --access public
237+
```
238+
this will publish package to **npm** starting with updating README and publishing tarballs
239+
136240
## License
137241

138242
[MIT](https://raw.githubusercontent.com/codingtools/cdt/master/LICENSE)

coverage/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)