diff --git a/.husky/post-merge b/.husky/post-merge index 0cf548c..1a17bc4 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -2,3 +2,4 @@ . "$(dirname -- "$0")/_/husky.sh" pnpm install +pnpm --filter astro-portabletext compile \ No newline at end of file diff --git a/component/.gitignore b/component/.gitignore index 7d94317..c3af857 100644 --- a/component/.gitignore +++ b/component/.gitignore @@ -1,3 +1 @@ -lib/*.js -lib/*.d.ts -!lib/astro.d.ts +lib/ diff --git a/component/.npmignore b/component/.npmignore deleted file mode 100644 index 0d23e15..0000000 --- a/component/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -*.ts -!*.d.ts -docs/ -scripts/ -tsconfig.json -test/ \ No newline at end of file diff --git a/component/package.json b/component/package.json index 654d9b5..ac86f62 100644 --- a/component/package.json +++ b/component/package.json @@ -39,6 +39,10 @@ ] } }, + "files": [ + "components", + "lib" + ], "scripts": { "build:fixture": "astro --root test/components/fixture/ build --silent", "check": "astro check --root components", diff --git a/component/lib/astro.d.ts b/component/src/astro.d.ts similarity index 51% rename from component/lib/astro.d.ts rename to component/src/astro.d.ts index bf90dba..dd61c71 100644 --- a/component/lib/astro.d.ts +++ b/component/src/astro.d.ts @@ -1,7 +1,7 @@ declare module "*.astro" { type Props = any; - const component: (props: Props) => any; + const Component: (props: Props) => any; - export default component; + export default Component; export type { Props }; } diff --git a/component/lib/components.ts b/component/src/components.ts similarity index 100% rename from component/lib/components.ts rename to component/src/components.ts diff --git a/component/lib/index.ts b/component/src/index.ts similarity index 100% rename from component/lib/index.ts rename to component/src/index.ts diff --git a/component/lib/internal.ts b/component/src/internal.ts similarity index 100% rename from component/lib/internal.ts rename to component/src/internal.ts diff --git a/component/lib/types.ts b/component/src/types.ts similarity index 100% rename from component/lib/types.ts rename to component/src/types.ts diff --git a/component/lib/utils.ts b/component/src/utils.ts similarity index 100% rename from component/lib/utils.ts rename to component/src/utils.ts diff --git a/component/lib/warnings.ts b/component/src/warnings.ts similarity index 100% rename from component/lib/warnings.ts rename to component/src/warnings.ts diff --git a/component/tsconfig.json b/component/tsconfig.json index 6f81a02..03772e1 100644 --- a/component/tsconfig.json +++ b/component/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "outDir": "lib", "importsNotUsedAsValues": "error", "isolatedModules": true, "declaration": true, @@ -9,5 +10,5 @@ "strict": true, "forceConsistentCasingInFileNames": true }, - "include": ["lib"] + "include": ["src"] }