|
@@ -5,16 +5,30 @@ The NCore, NİBGAT® UI - Kit. The NİBGAT®'s UI / Component Library.
|
|
|
|
|
|
|
|
NCore UI Kit provides built-in configuration tools to maintain standard coding guidelines and ensure seamless integration across NİBGAT projects.
|
|
NCore UI Kit provides built-in configuration tools to maintain standard coding guidelines and ensure seamless integration across NİBGAT projects.
|
|
|
|
|
|
|
|
-### 1. Environment Setup (One-Click)
|
|
|
|
|
|
|
+### 1. Type & Lint Configuration (Optional)
|
|
|
|
|
|
|
|
-If you want to use the exact same ESLint rules, TypeScript configs, and VSCode settings used in NCore UI Kit, simply run the setup command in your project root:
|
|
|
|
|
|
|
+If you want to use the exact same ESLint rules, TypeScript configs, and VSCode settings used in NCore UI Kit, run the type-kit command in your project root:
|
|
|
|
|
+
|
|
|
|
|
+```bash
|
|
|
|
|
+npx ncore-type-kit
|
|
|
|
|
+```
|
|
|
|
|
+*This command safely merges `.vscode/`, `eslint.config.mjs`, `eslint-local-rules/`, and `tsconfig.json` (preserves your existing include/exclude options) to your project.*
|
|
|
|
|
+
|
|
|
|
|
+### 2. Auto Configuration for Webpack & Metro
|
|
|
|
|
+
|
|
|
|
|
+To automatically inject NCore UI Kit plugins into your existing `webpack.config.js` and `metro.config.js`, you can run:
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
npx ncore-setup
|
|
npx ncore-setup
|
|
|
```
|
|
```
|
|
|
-*This command automatically copies `.vscode/`, `eslint.config.mjs`, `eslint-local-rules/`, and `tsconfig.json` to your project.*
|
|
|
|
|
|
|
|
|
|
-### 2. Webpack Configuration (React Native Web)
|
|
|
|
|
|
|
+If you only want to configure one specific platform, use:
|
|
|
|
|
+```bash
|
|
|
|
|
+npx ncore-setup-web # Only updates webpack.config.js
|
|
|
|
|
+npx ncore-setup-mobile # Only updates metro.config.js
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+### 3. Manual Webpack Configuration (React Native Web)
|
|
|
|
|
|
|
|
When building a web project with React Native Web, you have two options:
|
|
When building a web project with React Native Web, you have two options:
|
|
|
|
|
|
|
@@ -54,9 +68,9 @@ let config = {
|
|
|
module.exports = withNCoreUIKitWebpack(config, webpack);
|
|
module.exports = withNCoreUIKitWebpack(config, webpack);
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-### 3. Metro Configuration (React Native Mobile)
|
|
|
|
|
|
|
+### 4. Manual Metro Configuration (React Native Mobile)
|
|
|
|
|
|
|
|
-If you are using this library in a React Native or Expo mobile project, you must update your `metro.config.js` to include the required Node.js core module polyfills (`crypto`, `process`, `stream`).
|
|
|
|
|
|
|
+If you did not use `npx ncore-setup` and are using this library in a React Native or Expo mobile project, you must manually update your `metro.config.js` to include the required Node.js core module polyfills (`crypto`, `process`, `stream`).
|
|
|
|
|
|
|
|
**For Expo Projects:**
|
|
**For Expo Projects:**
|
|
|
|
|
|