mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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
|
||||
export { type PageData, usePageData } from './src/context/pageData';
|
||||
export { type PageData, usePageData } from './src/context/page-data';
|
||||
|
||||
// Hooks
|
||||
export { useUrl } from './src/hooks/useUrl';
|
||||
export { useUrl } from './src/hooks/use-url';
|
||||
|
||||
// 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 c2k from 'koa2-connect/ts';
|
||||
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 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';
|
||||
|
||||
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> {
|
||||
const data = usePageData();
|
||||
@@ -1,6 +1,6 @@
|
||||
import { compile } from 'path-to-regexp';
|
||||
import { useCallback } from 'react';
|
||||
import { useRouteMap } from './useRouteMap';
|
||||
import { useRouteMap } from './use-route-map';
|
||||
|
||||
function buildUrl(pattern: string, params: Record<string, string> = {}): string {
|
||||
try {
|
||||
@@ -1,8 +1,8 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import plugins from 'virtual:hydro-plugins';
|
||||
import App from './App';
|
||||
import { type PageData, PageDataProvider } from './context/pageData';
|
||||
import App from './app';
|
||||
import { type PageData, PageDataProvider } from './context/page-data';
|
||||
import { createRegistryContext } from './registry';
|
||||
|
||||
const ctx = createRegistryContext();
|
||||
|
||||
Reference in new issue
Block a user