Browse Source

Update components linking

Add a mechanism for ordering components in component pages.
master
TheoryOfNekomata 1 year ago
parent
commit
b4674f7f33
4 changed files with 16 additions and 2 deletions
  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 View File

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


export const PageLayout = () => { export const PageLayout = () => {
return ( return (


+ 1
- 0
packages/amanuensis/TODO.md View File

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

+ 6
- 0
packages/amanuensis/amanuensis.d.ts View File

@@ -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 View File

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

// todo merge package.json

const componentsList = [ 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 { try {


Loading…
Cancel
Save