Skip to content

Create version of HTMLHint for the browser only #316

Closed

Description

@mehagar

Is your feature request related to a problem? Please describe.
We want to use HTMLHint in the browser, but there are many dependencies that only seem to be used for the CLI version of HTMLHint.

Describe the solution you'd like
A new npm package to be published that only includes the one file necessary to run HTMLHint in a browser.

Describe alternatives you've considered
None.

Additional context
We are shipping npm dependencies, and we want to avoid having to do a licensing review for all of the current dependencies.

Activity

  1. self-assigned this
    on Jan 10, 2019
  2. added
    enhancement
    good first issue
    on Jan 10, 2019
  3. PixelDust22 commented on Feb 24, 2019

    @PixelDust22
    Contributor

    The code is now compiled into a umd package with all unnecessary dependencies removed.

    <script src="https://cdn.jsdelivr.net/npm/htmlhint@latest/dist/htmlhint.js"></script>
    <script>
      let messages = HTMLHint.default.verify('<ul><li></ul>', {'tag-pair': true});
      console.log(messages)
    </script>

    See https://github.com/htmlhint/HTMLHint/wiki/Usage

  4. rajsite commented on Feb 24, 2019

    @rajsite

    @Neo-Zhixing I think there was a misunderstanding. The issue was that the htmlhint npm package includes many dependencies because of the CLI.

    If we use htmllint then those dependencies end up in our desktop application (similar to an electron application) and having the extra dependencies for the CLI adds a lot of unused packages. It's also slows down builds to install the extra unused packages.

    One idea would be to possible have them as separate npm packages. Some examples could be htmlhint-js + htmlhint, or htmlhint-core + htmlhint, or htmlhint +htmlhint-cli, etc.

    As-is the latest package.json still lists lots of dependencies that are useful only for the CLI.

  5. PixelDust22 commented on Feb 25, 2019

    @PixelDust22
    Contributor

    Apologies for misunderstanding.
    htmlhint + htmlhint-core sounds like a good idea. However it requires a lot more work to be done, and it's probably a breaking change. I'll reopen this issue now.

  6. stale commented on May 14, 2020

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  7. added
    bot:stale
    on May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PR neededbot:staleenhancementgood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions