html-encrypt

1.3.2 • Public • Published

html-encrypt

A zero config (and only optional minifiers as dependencies) to encrypt html files. This is a heavy modified clone of staticrypt.


Live Example

Installation

npm i html-encrypt

Execute

npx html-encrypt <path/index.html>

Note: running the command will modify the file.

Options

  • You will be asked to enter the Password


    Please consider using a safe password

  • Additionally, you can bring in your own template. Create a .html file and reference it when asked in the CLI.

    <form method="post">
        PW: <input type="password" name="" id="">
        <button type="submit">Login</button>
    </form>
  • You can also set the password with -p

    npx html-encrypt --remove-head <path/index.html> -p <long-password>
  • You can also add --remove-head in order to remove the content of the head for the output file. This might be needed for some SPAs.

    npx html-encrypt --remove-head <path/index.html>
  • You can also add --no-minify in order to not use html-minifier-terser and esbuild.

    npx html-encrypt --no-minify <path/index.html>
  • You can also skip the optional template path with --own-template. Or combine it with a secure -p in a Pipeline.

    npx html-encrypt --own-template <path/index.html>

Package Sidebar

Install

npm i html-encrypt

Weekly Downloads

3

Version

1.3.2

License

MIT

Unpacked Size

357 kB

Total Files

14

Last publish

Collaborators

  • krutsch