Skip to content

Commit

Permalink
Add unit tests #2 and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Apr 21, 2022
1 parent bb87e41 commit 83ed373
Show file tree
Hide file tree
Showing 12 changed files with 100 additions and 12,785 deletions.
2 changes: 2 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"all": true,
"include": [
"index.js",
"bin/**/*.js",
"src/**/*.js"
],
"exclude": [
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ else
endif

.DEFAULT_GOAL := help
.PHONY: all run clean

# @HELP Install.
install:
@echo
@echo "Installing..."
install-deps

# @HELP Run production password-generator.
# @HELP Run password-generator.
run:
@echo
@echo "Running the production password-generator..."
npx node 'dist/src/index.js' production
@echo "Running the password-generator..."
npx node . -t base64 -l 8 -i 4 -s -

# @HELP Run the developer password-generator.
dev:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
A fast, simple and powerful open-source utility tool for generating strong, unique and random passwords. Password Generator is free to use as a secure password generator on any computer, phone, or tablet.

[![Getting Started](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/src/images/button-primary.svg)](#installation)
[![Download the Password Generator Tool v1.0.5](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/src/images/button-secondary.svg)](https://github.com/sebastienrousseau/password-generator/archive/refs/tags/1.0.5.zip)
[![Download the Password Generator Tool v1.0.6](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/src/images/button-secondary.svg)](https://github.com/sebastienrousseau/password-generator/archive/refs/tags/1.0.6.zip)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0acb169c95e443729551979e0fd86eaf)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=sebastienrousseau/password-generator&utm_campaign=Badge_Grade)
[![npm](https://img.shields.io/npm/v/@sebastienrousseau/password-generator.svg?style=flat&color=success)](https://www.npmjs.com/package/@sebastienrousseau/password-generator)
Expand Down
6 changes: 3 additions & 3 deletions src/bin/password-generator.js → bin/password-generator.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*jshint esversion: 8 */
import { base64Password } from "../lib/base64-password.js";
import { base64Password } from "../src/lib/base64-password.js";
import { Command } from "commander";
import { complexPassword } from "../lib/complex-password.js";
import { complexPassword } from "../src/lib/complex-password.js";
import { join } from "path";
import { memorablePassword } from "../lib/memorable-password.js";
import { memorablePassword } from "../src/lib/memorable-password.js";
import { readFileSync } from "fs";

// Initializing Variables
Expand Down
2 changes: 2 additions & 0 deletions src/index.js → index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env node

/*jshint esversion: 8 */

import { passwordGenerator } from "./bin/password-generator.js";
Expand Down
Loading

0 comments on commit 83ed373

Please sign in to comment.