@djangocfg/ext-base 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -25
- package/package.json +11 -8
- package/preview.png +0 -0
- package/src/cli/index.ts +326 -160
- package/src/config.ts +17 -0
- package/src/extensionConfig.ts +65 -0
- package/src/index.ts +5 -1
- package/src/metadata.ts +72 -0
- package/src/types/context.ts +135 -8
- package/src/utils/createExtensionConfig.ts +155 -0
- package/src/utils/index.ts +5 -0
- package/templates/extension-template/README.md.template +64 -0
- package/templates/extension-template/package.json.template +80 -0
- package/templates/extension-template/preview.png +0 -0
- package/templates/extension-template/src/components/.gitkeep +0 -0
- package/templates/extension-template/src/config.ts +34 -0
- package/templates/extension-template/src/contexts/__PROVIDER_NAME__Context.tsx +41 -0
- package/templates/extension-template/src/contexts/__PROVIDER_NAME__ExtensionProvider.tsx +36 -0
- package/templates/extension-template/src/hooks/index.ts +27 -0
- package/templates/extension-template/src/index.ts +17 -0
- package/templates/extension-template/src/types.ts +7 -0
- package/templates/extension-template/tsconfig.json +8 -0
- package/templates/extension-template/tsup.config.ts +40 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @djangocfg/ext-__NAME__
|
|
3
|
+
* Server-safe entry point (no client-only code)
|
|
4
|
+
*
|
|
5
|
+
* Contains types and server-safe exports only.
|
|
6
|
+
* For React hooks and SWR, use '@djangocfg/ext-__NAME__/hooks'
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Config
|
|
11
|
+
// ============================================================================
|
|
12
|
+
export { extensionConfig } from './config';
|
|
13
|
+
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Types
|
|
16
|
+
// ============================================================================
|
|
17
|
+
export type * from './types';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup';
|
|
2
|
+
|
|
3
|
+
export default defineConfig([
|
|
4
|
+
// Config only (server-safe, no React)
|
|
5
|
+
{
|
|
6
|
+
entry: {
|
|
7
|
+
config: 'src/config.ts',
|
|
8
|
+
},
|
|
9
|
+
format: ['cjs', 'esm'],
|
|
10
|
+
dts: true,
|
|
11
|
+
external: ['@djangocfg/ext-base'],
|
|
12
|
+
},
|
|
13
|
+
// Client components
|
|
14
|
+
{
|
|
15
|
+
entry: {
|
|
16
|
+
index: 'src/index.ts',
|
|
17
|
+
hooks: 'src/hooks/index.ts',
|
|
18
|
+
},
|
|
19
|
+
format: ['cjs', 'esm'],
|
|
20
|
+
dts: true,
|
|
21
|
+
clean: false,
|
|
22
|
+
splitting: false,
|
|
23
|
+
sourcemap: true,
|
|
24
|
+
external: [
|
|
25
|
+
'react',
|
|
26
|
+
'react-dom',
|
|
27
|
+
'next',
|
|
28
|
+
'lucide-react',
|
|
29
|
+
'@djangocfg/ext-base',
|
|
30
|
+
'@djangocfg/ui-nextjs',
|
|
31
|
+
'swr',
|
|
32
|
+
'consola',
|
|
33
|
+
],
|
|
34
|
+
esbuildOptions(options) {
|
|
35
|
+
options.banner = {
|
|
36
|
+
js: '"use client";',
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
]);
|