@devstgo/stgo-salta-components-react 0.1.7 → 0.1.9

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 CHANGED
@@ -1,80 +1,54 @@
1
- # React + TypeScript + Vite
1
+ # Salta components
2
2
 
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+ Librería de componentes interna.
4
4
 
5
- Currently, two official plugins are available:
6
5
 
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
6
+ ## Publicar en npm
7
+
8
+ npm run build
9
+ npm login
10
+ npm publish --access public
9
11
 
10
- ## React Compiler
12
+ ## Linkar localmente la lib con otros proyectos
11
13
 
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
14
+ En la carpeta de la lib:
13
15
 
14
- ## Expanding the ESLint configuration
16
+ npm link
15
17
 
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
18
+ En la carpeta del proyecto consumidor:
17
19
 
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
20
+ npm link @devstgo/stgo-salta-components-react
25
21
 
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
22
+ ### Consideraciones importantes con Vite:
32
23
 
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
24
+ Vite puede dar problemas con symlinks por cómo resuelve dependencias. Si te encuentras con errores, añade esto en el vite.config.ts del proyecto consumidor:
25
+
26
+ tsexport default defineConfig({
27
+ resolve: {
28
+ preserveSymlinks: true,
42
29
  },
43
- ])
44
- ```
45
-
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
-
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
52
-
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
30
+ server: {
31
+ watch: {
32
+ // Para que detecte cambios en la lib linkeada
33
+ ignored: ['!**/node_modules/@devstgo/**'],
70
34
  },
71
35
  },
72
- ])
73
- ```
36
+ optimizeDeps: {
37
+ // Excluir la lib del pre-bundling para usar siempre la versión fresca
38
+ exclude: ['@devstgo/stgo-salta-components-react'],
39
+ },
40
+ });
74
41
 
42
+ ## Deslinkar
75
43
 
76
- ## Publicar en npm
44
+ En el proyecto consumidor:
77
45
 
78
- npm run build
79
- npm login
80
- npm publish --access public
46
+ hnpm unlink @devstgo/stgo-salta-components-react
47
+ npm install
48
+
49
+ Si unlink da problemas (a veces pasa), la forma más limpia:
50
+
51
+ rm -rf node_modules
52
+ npm install
53
+
54
+ En ambos casos, recuerda también revertir los cambios en vite.config.ts si habías añadido preserveSymlinks, optimizeDeps.exclude, o los alias de React.