Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-o, --output [string] [required] [default: "./dist"]
-l, --lang generate the lang attribute [string] [required] [default: "."]
-i, --input convert .txt file to html file [string] [required]
-
Get the title of the .txt file and put the name of the title into
title
, also put it intoh1
that insidebody
-
Personal
footer
-
Convert a
MD
file to aHTML
file -
A feature for
language
in<html>
npm run prettier
is the command to run the prettier command with the mainjs
file --server.js
.npm run prettier-check
is the command to check if the mainjs
file --server.js
run the prettier or not.
npm run eslint
is the command to run the eslint command with mainjs
file --server.js
to check the coding syntax.npm run eslint-fix
is the command to fix some command or basic error for theserver.js
, and return warnings for what can't be fixed automatically.
extensions.json
Specify the static extensions. For helping the cooperator to install servals recommended extensions.settings.json
Specify settings for the editor. Ensure that whenever the cooperator saves a file, the program would format the code using the prettier extension.
npm run test
is the command to run all testing files of the program(currently only have 1 test file).npm run test .\htmlGenerator.test.js
is the command to run the specific testing functions in the htmlGenerator.test.js.
npm run test:watch
is the command to run the test runner watch. It will show a list of options for testing:
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
And you can type in 'a' or 'f' or 'p' or 't' or 'q' to selection an option. Also, you can press to trigger a test run.
npm run coverage
is the command to run the Code Coverage Analysis, it will run the tests generate a coverage report to the user. It will have a table similar to this:
------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
htmlGenerator.js | 100 | 100 | 100 | 100 |
------------------|---------|----------|---------|---------|-------------------