@tixionn/core 1.0.0 → 1.0.2
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 +172 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# @tixionn/core
|
|
2
|
+
|
|
3
|
+
> Core utilities and shared package for Tixion
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@tixionn/core)
|
|
6
|
+
[](https://opensource.org/licenses/ISC)
|
|
7
|
+
[](https://github.com/tixionn/core/actions/workflows/publish.yml)
|
|
8
|
+
|
|
9
|
+
## 📦 Installation
|
|
10
|
+
|
|
11
|
+
Install the package using your preferred package manager:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# npm
|
|
15
|
+
npm install @tixionn/core
|
|
16
|
+
|
|
17
|
+
# pnpm
|
|
18
|
+
pnpm add @tixionn/core
|
|
19
|
+
|
|
20
|
+
# yarn
|
|
21
|
+
yarn add @tixionn/core
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 🚀 Features
|
|
25
|
+
|
|
26
|
+
- **Shared Prettier Configuration** - Consistent code formatting across all Tixion projects
|
|
27
|
+
- **Import Sorting** - Automatic import organization with `@trivago/prettier-plugin-sort-imports`
|
|
28
|
+
- **Zero Config** - Works out of the box with sensible defaults
|
|
29
|
+
- **TypeScript Ready** - Full TypeScript support
|
|
30
|
+
|
|
31
|
+
## 📖 Usage
|
|
32
|
+
|
|
33
|
+
### Prettier Configuration
|
|
34
|
+
|
|
35
|
+
This package exports a shared Prettier configuration that can be used across your projects.
|
|
36
|
+
|
|
37
|
+
#### Option 1: Using `package.json`
|
|
38
|
+
|
|
39
|
+
Add this to your `package.json`:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"prettier": "@tixionn/core/prettier"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Option 2: Using `.prettierrc.js`
|
|
48
|
+
|
|
49
|
+
Create a `.prettierrc.js` file:
|
|
50
|
+
|
|
51
|
+
```javascript
|
|
52
|
+
module.exports = require('@tixionn/core/prettier');
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Option 3: Using `.prettierrc.mjs`
|
|
56
|
+
|
|
57
|
+
Create a `.prettierrc.mjs` file:
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
import config from '@tixionn/core/prettier';
|
|
61
|
+
|
|
62
|
+
export default config;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Configuration Details
|
|
66
|
+
|
|
67
|
+
The Prettier configuration includes:
|
|
68
|
+
|
|
69
|
+
- **No trailing commas** - Clean object and array syntax
|
|
70
|
+
- **4-space indentation** - Using tabs for consistency
|
|
71
|
+
- **No semicolons** - Cleaner JavaScript/TypeScript code
|
|
72
|
+
- **Single quotes** - For strings and JSX
|
|
73
|
+
- **Arrow function parens** - Avoid unnecessary parentheses
|
|
74
|
+
- **Organized imports** - Automatic sorting and grouping
|
|
75
|
+
|
|
76
|
+
Import order:
|
|
77
|
+
|
|
78
|
+
1. Third-party modules
|
|
79
|
+
2. `@/` prefixed imports (aliases)
|
|
80
|
+
3. Parent directory imports (`../`)
|
|
81
|
+
4. Current directory imports (`./`)
|
|
82
|
+
|
|
83
|
+
## 🛠️ Development
|
|
84
|
+
|
|
85
|
+
### Prerequisites
|
|
86
|
+
|
|
87
|
+
- Node.js 20 or higher
|
|
88
|
+
- pnpm (recommended)
|
|
89
|
+
|
|
90
|
+
### Local Setup
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Clone the repository
|
|
94
|
+
git clone https://github.com/tixionn/core.git
|
|
95
|
+
|
|
96
|
+
# Navigate to the directory
|
|
97
|
+
cd core
|
|
98
|
+
|
|
99
|
+
# Install dependencies
|
|
100
|
+
pnpm install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Publishing
|
|
104
|
+
|
|
105
|
+
The package is automatically published to npm when changes are pushed to the `main` branch via GitHub Actions.
|
|
106
|
+
|
|
107
|
+
To manually publish:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm version patch # or minor/major
|
|
111
|
+
git push --tags
|
|
112
|
+
npm publish
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 📝 Configuration Reference
|
|
116
|
+
|
|
117
|
+
The full Prettier configuration:
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
{
|
|
121
|
+
trailingComma: "none",
|
|
122
|
+
tabWidth: 4,
|
|
123
|
+
useTabs: true,
|
|
124
|
+
semi: false,
|
|
125
|
+
singleQuote: true,
|
|
126
|
+
jsxSingleQuote: true,
|
|
127
|
+
arrowParens: "avoid",
|
|
128
|
+
importOrderSeparation: true,
|
|
129
|
+
importOrderSortSpecifiers: true,
|
|
130
|
+
importOrderCaseInsensitive: true,
|
|
131
|
+
importOrder: [
|
|
132
|
+
"<THIRD_PARTY_MODULES>",
|
|
133
|
+
"^@/(.*)$",
|
|
134
|
+
"^../(.*)$",
|
|
135
|
+
"^./(.*)$"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## 🤝 Contributing
|
|
141
|
+
|
|
142
|
+
Contributions are welcome! Please follow these steps:
|
|
143
|
+
|
|
144
|
+
1. Fork the repository
|
|
145
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
146
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
147
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
148
|
+
5. Open a Pull Request
|
|
149
|
+
|
|
150
|
+
## 📄 License
|
|
151
|
+
|
|
152
|
+
This project is licensed under the ISC License.
|
|
153
|
+
|
|
154
|
+
## 👤 Author
|
|
155
|
+
|
|
156
|
+
**Raju**
|
|
157
|
+
|
|
158
|
+
- Email: contact@tixion.com
|
|
159
|
+
|
|
160
|
+
## 🔗 Links
|
|
161
|
+
|
|
162
|
+
- [npm Package](https://www.npmjs.com/package/@tixionn/core)
|
|
163
|
+
- [GitHub Repository](https://github.com/tixionn/core)
|
|
164
|
+
- [Issue Tracker](https://github.com/tixionn/core/issues)
|
|
165
|
+
|
|
166
|
+
## 📊 Package Stats
|
|
167
|
+
|
|
168
|
+
This package is part of the Tixion ecosystem, providing shared configurations and utilities for consistent development experience across all Tixion projects.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
Made with ❤️ by the Tixion team
|