From 9be7e1d352196be4db3d60915a7b1a1edf272817 Mon Sep 17 00:00:00 2001 From: William Johnston Date: Fri, 22 Oct 2021 09:41:23 -0700 Subject: [PATCH] feat: (#591) creating @faustjs/next/config export --- packages/next/config.d.ts | 1 + packages/next/package.json | 4 ++++ packages/next/src/{ => config}/config.ts | 0 packages/next/src/config/index.ts | 2 ++ packages/next/src/{ => config}/withFaust.ts | 0 packages/next/src/export/config.ts | 1 + packages/next/src/export/index.ts | 4 ++-- packages/next/src/export/utils.ts | 1 + packages/next/src/getProps.tsx | 2 +- packages/next/utils.d.ts | 1 + 10 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 packages/next/config.d.ts rename packages/next/src/{ => config}/config.ts (100%) create mode 100644 packages/next/src/config/index.ts rename packages/next/src/{ => config}/withFaust.ts (100%) create mode 100644 packages/next/src/export/config.ts create mode 100644 packages/next/src/export/utils.ts create mode 100644 packages/next/utils.d.ts diff --git a/packages/next/config.d.ts b/packages/next/config.d.ts new file mode 100644 index 000000000..594a18687 --- /dev/null +++ b/packages/next/config.d.ts @@ -0,0 +1 @@ +export * from './dist/cjs/export/config'; diff --git a/packages/next/package.json b/packages/next/package.json index e8c66d054..6e581dc68 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -14,6 +14,10 @@ "import": "./dist/mjs/export/client.js", "require": "./dist/cjs/export/client.js" }, + "./config": { + "import": "./dist/mjs/export/config.js", + "require": "./dist/cjs/export/config.js" + }, "./utils": { "import": "./dist/mjs/export/utils.js", "require": "./dist/cjs/export/utils.js" diff --git a/packages/next/src/config.ts b/packages/next/src/config/config.ts similarity index 100% rename from packages/next/src/config.ts rename to packages/next/src/config/config.ts diff --git a/packages/next/src/config/index.ts b/packages/next/src/config/index.ts new file mode 100644 index 000000000..c226ad812 --- /dev/null +++ b/packages/next/src/config/index.ts @@ -0,0 +1,2 @@ +export * from './config'; +export * from './withFaust'; diff --git a/packages/next/src/withFaust.ts b/packages/next/src/config/withFaust.ts similarity index 100% rename from packages/next/src/withFaust.ts rename to packages/next/src/config/withFaust.ts diff --git a/packages/next/src/export/config.ts b/packages/next/src/export/config.ts new file mode 100644 index 000000000..49b48d7c5 --- /dev/null +++ b/packages/next/src/export/config.ts @@ -0,0 +1 @@ +export * from '../config'; diff --git a/packages/next/src/export/index.ts b/packages/next/src/export/index.ts index 4f86a76a0..7200e34af 100644 --- a/packages/next/src/export/index.ts +++ b/packages/next/src/export/index.ts @@ -1,7 +1,7 @@ export * from '../gqty/client'; -export * from '../config'; +export * from '../config/config'; export * from '../getProps'; export * from '../HeadlessProvider'; export * from '../utils'; -export * from '../withFaust'; +export * from '../config/withFaust'; export * from '../log'; diff --git a/packages/next/src/export/utils.ts b/packages/next/src/export/utils.ts new file mode 100644 index 000000000..e3f6a92a5 --- /dev/null +++ b/packages/next/src/export/utils.ts @@ -0,0 +1 @@ +export * from '../utils'; diff --git a/packages/next/src/getProps.tsx b/packages/next/src/getProps.tsx index 1a78442a2..24f1f28f9 100644 --- a/packages/next/src/getProps.tsx +++ b/packages/next/src/getProps.tsx @@ -12,7 +12,7 @@ import { import { RouterContext } from 'next/dist/shared/lib/router-context'; import React, { FunctionComponent, ComponentClass } from 'react'; -import { config } from './config'; +import { config } from './config/config'; import { getClient, HeadlessContext } from './gqty/client'; import { diff --git a/packages/next/utils.d.ts b/packages/next/utils.d.ts new file mode 100644 index 000000000..6b4fb7627 --- /dev/null +++ b/packages/next/utils.d.ts @@ -0,0 +1 @@ +export * from './dist/cjs/export/utils';