chore: rename package from @hykocx/zen to @zen/core
Update all references across source files, documentation, and configuration to reflect the new package scope and name. This includes updating `.npmrc` registry config, install instructions, module examples, and all import path comments throughout the codebase.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Créer un module externe
|
||||
|
||||
Un module externe est un package npm indépendant qui s'intègre dans une app qui utilise `@hykocx/zen`. Il n'a pas besoin de modifier le code source du CMS.
|
||||
Un module externe est un package npm indépendant qui s'intègre dans une app qui utilise `@zen/core`. Il n'a pas besoin de modifier le code source du CMS.
|
||||
|
||||
---
|
||||
|
||||
@@ -10,7 +10,7 @@ Un module externe est un package npm indépendant qui s'intègre dans une app qu
|
||||
@scope/zen-nom-du-module
|
||||
```
|
||||
|
||||
Exemples : `@hykocx/zen-invoice`, `@hykocx/zen-nuage`.
|
||||
Exemples : `@zen/core-invoice`, `@zen/core-nuage`.
|
||||
|
||||
---
|
||||
|
||||
@@ -34,11 +34,11 @@ zen-invoice/
|
||||
|
||||
## index.js
|
||||
|
||||
On utilise `defineModule()` importé depuis `@hykocx/zen/modules/define`.
|
||||
On utilise `defineModule()` importé depuis `@zen/core/modules/define`.
|
||||
|
||||
```js
|
||||
import { lazy } from 'react';
|
||||
import { defineModule } from '@hykocx/zen/modules/define';
|
||||
import { defineModule } from '@zen/core/modules/define';
|
||||
|
||||
import { createTables, dropTables } from './db.js';
|
||||
import { getInvoiceByToken } from './actions.js';
|
||||
@@ -149,7 +149,7 @@ async setup(ctx) {
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "@hykocx/zen-invoice",
|
||||
"name": "@zen/core-invoice",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"main": "./index.js",
|
||||
@@ -157,7 +157,7 @@ async setup(ctx) {
|
||||
".": "./index.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@hykocx/zen": ">=1.0.0",
|
||||
"@zen/core": ">=1.0.0",
|
||||
"react": ">=19.0.0"
|
||||
}
|
||||
}
|
||||
@@ -170,14 +170,14 @@ async setup(ctx) {
|
||||
### 1. Installer le package
|
||||
|
||||
```bash
|
||||
npm install @hykocx/zen-invoice
|
||||
npm install @zen/core-invoice
|
||||
```
|
||||
|
||||
### 2. Créer zen.config.js à la racine de l'app
|
||||
|
||||
```js
|
||||
// zen.config.js
|
||||
import invoiceModule from '@hykocx/zen-invoice';
|
||||
import invoiceModule from '@zen/core-invoice';
|
||||
|
||||
export default {
|
||||
modules: [invoiceModule],
|
||||
@@ -192,7 +192,7 @@ import zenConfig from './zen.config.js';
|
||||
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
const { initializeZen } = await import('@hykocx/zen');
|
||||
const { initializeZen } = await import('@zen/core');
|
||||
await initializeZen(zenConfig);
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ export async function register() {
|
||||
```jsx
|
||||
// app/layout.js
|
||||
import zenConfig from './zen.config.js';
|
||||
import { ZenProvider } from '@hykocx/zen/provider';
|
||||
import { ZenProvider } from '@zen/core/provider';
|
||||
|
||||
export default function RootLayout({ children }) {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Créer un module interne
|
||||
|
||||
Un module interne vit dans `src/modules/` et fait partie du package `@hykocx/zen`. Il a accès direct aux services du CMS sans passer par un contexte injecté.
|
||||
Un module interne vit dans `src/modules/` et fait partie du package `@zen/core`. Il a accès direct aux services du CMS sans passer par un contexte injecté.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user