Skip to content
View htmlcomponents's full-sized avatar

Block or report htmlcomponents

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
htmlcomponents/readme.md

HTML Components

Create a project with HTML components.

Pre-alpha!

npx @htmlcomponents/create

Installs Vite and postCSS.

Run with Vite

cd path/to/new/project
npm run dev

# or
npm run build
npm run preview

To run with no build system (i.e. without Vite)

Copy /public/import and /public/assets to the root directory of new project.

In VS Code, use an extension like Live Server.

Right-click index.html at root of new project and select "Open with Live Server.

If using Live Server, be sure that your new project is at the top level of the current VS Code workspace, not in a subfolder of the workspace.

Vite-html-import-plugin

Vite-html-import-plugin transforms HTML by removing and replacing custom elements whose source files are in the public directory.

Without this plugin, html-import will import its content at run time.

vite.config.js:

import { defineConfig } from "vite";

import viteHTMLImportPlugin from "./components/imports/viteHTMLImportPlugin/viteHTMLImportPlugin";

export default defineConfig({
  plugins: [viteHTMLImportPlugin()],
});

Popular repositories Loading

  1. shadow-layers shadow-layers Public

    JavaScript 4

  2. declarative-shadow-imports declarative-shadow-imports Public

    1

  3. htmlcomponents htmlcomponents Public

    JavaScript

  4. dsd-links dsd-links Public

    HTML

  5. declarative-imports declarative-imports Public

    JavaScript

  6. dsd-set-html-unsafe dsd-set-html-unsafe Public

    HTML 1