mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui-next: use kebab-case for file naming
This commit is contained in:
7 files changed
+8
-8
No files matched your search
@@ -1,8 +1,8 @@
|
|||||||
// Context
|
// Context
|
||||||
export { type PageData, usePageData } from './src/context/pageData';
|
export { type PageData, usePageData } from './src/context/page-data';
|
||||||
|
|
||||||
// Hooks
|
// Hooks
|
||||||
export { useUrl } from './src/hooks/useUrl';
|
export { useUrl } from './src/hooks/use-url';
|
||||||
|
|
||||||
// Registry
|
// Registry
|
||||||
export type { ComponentName, RegistryContext } from './src/registry';
|
export type { ComponentName, RegistryContext } from './src/registry';
|
||||||
@@ -6,7 +6,7 @@ import importMetaUrlPlugin from '@chialab/esbuild-plugin-meta-url';
|
|||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
import c2k from 'koa2-connect/ts';
|
import c2k from 'koa2-connect/ts';
|
||||||
import { createServer, type Plugin } from 'vite';
|
import { createServer, type Plugin } from 'vite';
|
||||||
import type { PageData } from './src/context/pageData';
|
import type { PageData } from './src/context/page-data';
|
||||||
|
|
||||||
const INJECT_MARKER = '<!-- __HYDRO_INJECTION__DO_NOT_REMOVE_THIS__ -->';
|
const INJECT_MARKER = '<!-- __HYDRO_INJECTION__DO_NOT_REMOVE_THIS__ -->';
|
||||||
const buildInject = (str: string) => `<script id="__HYDRO_INJECTION__" type="application/json">${str}</script>`;
|
const buildInject = (str: string) => `<script id="__HYDRO_INJECTION__" type="application/json">${str}</script>`;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { usePageData } from './context/pageData';
|
import { usePageData } from './context/page-data';
|
||||||
import { Component } from './registry';
|
import { Component } from './registry';
|
||||||
|
|
||||||
const AppInner = Component('page:app', () => {
|
const AppInner = Component('page:app', () => {
|
||||||
|
|||||||
File renamed without changes.
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { usePageData } from '../context/pageData';
|
import { usePageData } from '../context/page-data';
|
||||||
|
|
||||||
export function useRouteMap(): Record<string, string> {
|
export function useRouteMap(): Record<string, string> {
|
||||||
const data = usePageData();
|
const data = usePageData();
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { compile } from 'path-to-regexp';
|
import { compile } from 'path-to-regexp';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { useRouteMap } from './useRouteMap';
|
import { useRouteMap } from './use-route-map';
|
||||||
|
|
||||||
function buildUrl(pattern: string, params: Record<string, string> = {}): string {
|
function buildUrl(pattern: string, params: Record<string, string> = {}): string {
|
||||||
try {
|
try {
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import { StrictMode } from 'react';
|
import { StrictMode } from 'react';
|
||||||
import { createRoot } from 'react-dom/client';
|
import { createRoot } from 'react-dom/client';
|
||||||
import plugins from 'virtual:hydro-plugins';
|
import plugins from 'virtual:hydro-plugins';
|
||||||
import App from './App';
|
import App from './app';
|
||||||
import { type PageData, PageDataProvider } from './context/pageData';
|
import { type PageData, PageDataProvider } from './context/page-data';
|
||||||
import { createRegistryContext } from './registry';
|
import { createRegistryContext } from './registry';
|
||||||
|
|
||||||
const ctx = createRegistryContext();
|
const ctx = createRegistryContext();
|
||||||
|
|||||||
Reference in new issue
Block a user