diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4ad798a..0f83891 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,52 @@ -1. Add tests for modified or additional code -2. Use a separate branch for development with the following naming convention +# Contributing +--- - [type]-[name] +***Use a separate branch for development with the following naming convention*** -**Examples:** +``` +- bugfix-some-unique-branch-name +- hotfix-some-unique-branch-name +- feature-some-unique-branch-name +``` - bugfix-some-unique-branch-name - hotfix-some-unique-branch-name - feature-some-unique-branch-na +1. clone this repo +1. install dependencies (jest for tests) `npm install` +1. create a new branch named `[type]-[name]` (see example below) +1. commit your changes +1. run tests `npm run test` +1. push your branch to the remote repository +1. create a pull request + +--- + +## Run tests + +`npm run test` + +![img.png](img.png) + +--- + +## Run encryption from command line + +`npm run encrypt` + +![img_1.png](img_1.png) + +--- + +## Minify + +Until I finalize the pipeline, builds are performed manually. + +`npm run build` + +Please keep the following in mind when developing: + +- Add tests for modified or additional code +- Keep code bloat to a minimum, the final minified code should remain very small +- Maintain a consistent style +- Use no dependencies +- Comment everything (see example) + +![img_3.png](img_3.png) \ No newline at end of file diff --git a/README.md b/README.md index 39acc71..50616b2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,16 @@ [![Node.js Package](https://github.com/w4ffl35/js-ktc/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/w4ffl35/js-ktc/actions/workflows/npm-publish.yml) [![CodeQL](https://github.com/w4ffl35/js-ktc/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/w4ffl35/js-ktc/actions/workflows/codeql-analysis.yml) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues) -An implementation of a basic keyword transposition cipher in Javascript with no external dependencies. +An implementation of a basic keyword transposition cipher in Javascript with zero dependencies. + +✅ Easy to use
+✅ Extensible
+✅ Test coverage
+✅ Lots of comments (good for education)
+✅ No bloat (zero dependencies)
+✅ MIT license + +--- ## Installation @@ -17,16 +26,16 @@ An implementation of a basic keyword transposition cipher in Javascript with no - **Encrypt** `ktc.encrypt('CRYPTOLOGY')` - **Decrypt** `ktc.decrypt('JHQSU XFXBQ')` -## Contributing - --- -Please use a separate branch for development with the following naming convention +## Limitations -`[type]-[name]` +The basic implementation only works with A-Z though it can easily be extended to support other characters. -***Examples:*** +--- + +## Development + +--- -- bugfix-some-unique-branch-name -- hotfix-some-unique-branch-name -- feature-some-unique-branch-name +See the [CONTRIBUTING.md](CONTRIBUTING.md) file for instructions on how to contribute to this project. diff --git a/img.png b/img.png new file mode 100644 index 0000000..19af7bf Binary files /dev/null and b/img.png differ diff --git a/img_1.png b/img_1.png new file mode 100644 index 0000000..d75568c Binary files /dev/null and b/img_1.png differ diff --git a/img_2.png b/img_2.png new file mode 100644 index 0000000..63adef6 Binary files /dev/null and b/img_2.png differ diff --git a/img_3.png b/img_3.png new file mode 100644 index 0000000..20a11b6 Binary files /dev/null and b/img_3.png differ diff --git a/package.json b/package.json index cfe876b..acc9eb8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "js-ktc", - "version": "1.1.6", + "version": "1.1.7", "description": "Javascript Keyword Transposition Cipher", "main": "cipher.min.js", "scripts": {