@idealyst/cli 1.0.14 → 1.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/cli",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "CLI tool for generating Idealyst Framework projects",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,12 @@
1
+ const path = require('path');
2
+
1
3
  module.exports = {
2
- presets: ['@react-native/babel-preset'],
4
+ presets: ['module:@react-native/babel-preset'],
3
5
  plugins: [
6
+ ['react-native-unistyles/plugin', {
7
+ root: 'src',
8
+ autoProcessPaths: ['@idealyst/components', '@idealyst/navigation', '@idealyst/theme'],
9
+ }],
4
10
  'react-native-reanimated/plugin',
5
11
  ],
6
- };
12
+ };
@@ -1,11 +1,28 @@
1
- const { getDefaultConfig } = require('@react-native/metro-config');
1
+ module.exports = wrapWithReanimatedMetroConfig(mergeConfig(getDefaultConfig(__dirname), config));
2
2
 
3
- /**
4
- * Metro configuration
5
- * https://reactnative.dev/docs/metro
6
- *
7
- * @type {import('metro-config').MetroConfig}
8
- */
9
- const config = getDefaultConfig(__dirname);
3
+ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
4
+ const path = require('path');
10
5
 
11
- module.exports = config;
6
+ const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config');
7
+
8
+ const config = {
9
+ projectRoot: __dirname,
10
+ resolver: {
11
+ nodeModulesPaths: [
12
+ path.resolve(__dirname, 'node_modules'),
13
+ ],
14
+ // Important for Idealyst to use .native extensions for React Native (eg: @idealyst/components/src/Button/Button.native.tsx)
15
+ sourceExts: ['native.tsx', 'native.ts', 'tsx', 'ts', 'native.jsx', 'native.js', 'jsx', 'js', 'json'],
16
+ },
17
+ watchFolders: [
18
+ path.resolve(__dirname, 'src'),
19
+ // To support live updates when developing components in other workspaces, add the folders here. Make sure
20
+ // path.resolve(__dirname, '../shared/'),
21
+ ],
22
+ watcher: {
23
+ // When configuring custom components with .native extensions, make sure the watcher looks for them
24
+ additionalExts: ['native.tsx', 'native.ts', 'native.jsx', 'native.js'],
25
+ },
26
+ };
27
+
28
+ module.exports = wrapWithReanimatedMetroConfig(mergeConfig(getDefaultConfig(__dirname), config));