Explorar el Código

Update components linking

Add a mechanism for ordering components in component pages.
master
TheoryOfNekomata hace 1 año
padre
commit
b4674f7f33
Se han modificado 4 ficheros con 16 adiciones y 2 borrados
  1. +1
    -1
      .amanuensis/next/src/components/PageLayout.tsx
  2. +1
    -0
      packages/amanuensis/TODO.md
  3. +6
    -0
      packages/amanuensis/amanuensis.d.ts
  4. +8
    -1
      packages/amanuensis/src/commands/refresh.ts

+ 1
- 1
.amanuensis/next/src/components/PageLayout.tsx Ver fichero

@@ -1,4 +1,4 @@
import { Preamble, Props, Playground } from '@/components/Amanuensis';
import { Preamble, Props, Playground } from '@tesseract-design/amanuensis-react';

export const PageLayout = () => {
return (


+ 1
- 0
packages/amanuensis/TODO.md Ver fichero

@@ -1,3 +1,4 @@
- [ ] Resolve `refresh` command TODOs
- [ ] Integrate components
- [ ] Add `build` command to create static file of the Next app
- [ ] Replace `serve` with `dev`? (for interactive development, have to figure out how to properly manage changes tho)

+ 6
- 0
packages/amanuensis/amanuensis.d.ts Ver fichero

@@ -0,0 +1,6 @@
declare module '@tesseract-design/amanuensis-react' {
import { FC } from 'react';
export const Preamble: FC;
export const Props: FC;
export const Playground: FC;
}

+ 8
- 1
packages/amanuensis/src/commands/refresh.ts Ver fichero

@@ -31,8 +31,15 @@ const linkComponents = async (cwd: string) => {
const projectCwd = resolve(cwd, '.amanuensis');
const defaultCwd = await useInternalPath('src', 'next');
const destCwd = await useInternalPath('.amanuensis', 'next', 'src');

// todo merge package.json

const componentsList = [
'components/Wrapper.tsx',
'next/src/components/Wrapper.tsx',
'next/src/components/PageLayout.tsx',
'next/src/components/theme.ts',
'next/src/components/postcss.config.js',
'next/src/components/tailwind.config.js',
];

try {


Cargando…
Cancelar
Guardar