Skip to content

Commit 939ca2a

Browse files
committed
feat: add extra columns support and configurable column widths
- Add ExtraColumn interface for custom columns - Add nameColumnWidth, fromColumnWidth, toColumnWidth props - Update TaskListHeader and TaskListTable components - Add example demonstrating extra columns - Create CONTRIBUTING.md and PUBLISHING.md documentation - Update package.json with new repository info
1 parent e9586a4 commit 939ca2a

File tree

4 files changed

+238
-7
lines changed

4 files changed

+238
-7
lines changed

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing to @scharinger/gantt-task-react
2+
3+
Thank you for your interest in contributing! This guide will help you set up the development environment.
4+
5+
## Development Setup
6+
7+
### Prerequisites
8+
- Node.js (v14 or higher)
9+
- npm
10+
11+
### Getting Started
12+
13+
```bash
14+
# Clone the repository
15+
git clone https://github.com/yourusername/gantt-task-react.git
16+
cd gantt-task-react
17+
18+
# Install dependencies
19+
npm install
20+
21+
# Build the library
22+
npm run build
23+
24+
# Run tests
25+
npm test
26+
```
27+
28+
### Running the Example
29+
30+
To test your changes with the example application:
31+
32+
```bash
33+
cd example
34+
npm install
35+
npm start
36+
```
37+
38+
The example will be available at `http://localhost:3000`.
39+
40+
## Development Workflow
41+
42+
1. **Make your changes** in the `src/` directory
43+
2. **Build the library** with `npm run build`
44+
3. **Test your changes** using the example application
45+
4. **Run tests** with `npm test`
46+
5. **Update documentation** if needed
47+
48+
## Code Guidelines
49+
50+
- Follow TypeScript best practices
51+
- Maintain existing code style
52+
- Add JSDoc comments for public APIs
53+
- Include tests for new features
54+
- Update documentation for new features
55+
56+
## Submitting Changes
57+
58+
1. Fork the repository
59+
2. Create a feature branch: `git checkout -b feature/your-feature-name`
60+
3. Make your changes
61+
4. Test your changes
62+
5. Commit with descriptive messages
63+
6. Push to your fork
64+
7. Create a Pull Request
65+
66+
## Publishing
67+
68+
For maintainers: See [PUBLISHING.md](PUBLISHING.md) for instructions on publishing new versions.
69+
70+
## Questions?
71+
72+
If you have questions about contributing, please open an issue on GitHub.

PUBLISHING.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Publishing Guide for @scharinger/gantt-task-react
2+
3+
This guide covers the process of publishing new versions of the package to npm.
4+
5+
## Version Strategy
6+
7+
We follow [Semantic Versioning](https://semver.org/):
8+
9+
- **Patch (0.4.X)**: Bug fixes and small improvements
10+
- **Minor (0.X.0)**: New features, backwards compatible
11+
- **Major (X.0.0)**: Breaking changes
12+
- **Beta (X.Y.Z-beta.N)**: Pre-release versions for testing
13+
14+
## Prerequisites
15+
16+
1. **npm account**: Make sure you're logged in to npm
17+
```bash
18+
npm whoami # Check if logged in
19+
npm login # Login if needed
20+
```
21+
22+
2. **Repository access**: You should have write access to the repository
23+
24+
3. **Clean working directory**: Commit all changes before publishing
25+
26+
## Publishing Steps
27+
28+
### 1. Update Version
29+
30+
Update the version in `package.json`:
31+
32+
```json
33+
{
34+
"version": "0.4.1-beta.0" // For beta releases
35+
// or
36+
"version": "0.4.1" // For stable releases
37+
}
38+
```
39+
40+
### 2. Update Documentation
41+
42+
- Update `README.md` if there are new features or API changes
43+
- Update `CHANGELOG.md` (if it exists) with the changes
44+
45+
### 3. Build and Test
46+
47+
```bash
48+
# Build the library
49+
npm run build
50+
51+
# Run tests
52+
npm test
53+
54+
# Test with example project
55+
cd example
56+
npm install
57+
npm start
58+
```
59+
60+
### 4. Publish to NPM
61+
62+
**For beta releases:**
63+
```bash
64+
npm publish --tag beta --access public
65+
```
66+
67+
**For stable releases:**
68+
```bash
69+
npm publish --access public
70+
```
71+
72+
### 5. Create Git Tag (Recommended)
73+
74+
```bash
75+
git tag v0.4.1-beta.0
76+
git push origin v0.4.1-beta.0
77+
```
78+
79+
### 6. Update GitHub Release (Optional)
80+
81+
Create a release on GitHub with:
82+
- Tag version
83+
- Release notes describing changes
84+
- Any breaking changes or migration notes
85+
86+
## Post-Publishing
87+
88+
### Verify Publication
89+
90+
Check that the package is available:
91+
92+
```bash
93+
npm view @scharinger/gantt-task-react versions --json
94+
```
95+
96+
### Test Installation
97+
98+
Test in a fresh project:
99+
100+
```bash
101+
mkdir test-install
102+
cd test-install
103+
npm init -y
104+
npm install @scharinger/gantt-task-react@beta # or @latest
105+
```
106+
107+
## Installation Commands for Users
108+
109+
After publishing, users can install with:
110+
111+
```bash
112+
# Latest stable version
113+
npm install @scharinger/gantt-task-react
114+
115+
# Beta version
116+
npm install @scharinger/gantt-task-react@beta
117+
118+
# Specific version
119+
npm install @scharinger/gantt-task-react@0.4.0-beta.0
120+
```
121+
122+
## Troubleshooting
123+
124+
### Common Issues
125+
126+
1. **402 Payment Required**: Use `--access public` for scoped packages
127+
2. **403 Forbidden**: Check npm login and package permissions
128+
3. **Version already exists**: Increment version number
129+
130+
### Rollback
131+
132+
If you need to unpublish (only for packages published less than 72 hours ago):
133+
134+
```bash
135+
npm unpublish @scharinger/gantt-task-react@0.4.1-beta.0
136+
```
137+
138+
**Note**: Unpublishing is discouraged and may not be possible for stable releases.
139+
140+
## Automation (Future)
141+
142+
Consider setting up GitHub Actions for automated publishing:
143+
144+
- Automated testing on PR
145+
- Automated beta releases on merge to develop
146+
- Automated stable releases on merge to main

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ You can customize the width of the default columns:
222222
223223
\*Required
224224
225+
## Contributing
226+
227+
For development setup and contributing guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md).
228+
229+
For maintainers: Publishing instructions are in [PUBLISHING.md](PUBLISHING.md).
230+
225231
## License
226232
227233
[MIT](https://oss.ninja/mit/jaredpalmer/)

package.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
{
2-
"name": "gantt-task-react",
3-
"version": "0.3.9",
4-
"description": "Interactive Gantt Chart for React with TypeScript.",
5-
"author": "MaTeMaTuK <maksym.vikarii@gmail.com>",
6-
"homepage": "https://github.com/MaTeMaTuK/gantt-task-react",
2+
"name": "@scharinger/gantt-task-react",
3+
"version": "0.4.0-beta.0",
4+
"description": "Interactive Gantt Chart for React with TypeScript and Extra Columns Support. Based on gantt-task-react by MaTeMaTuK.",
5+
"author": "scharinger <din-email@example.com>",
6+
"homepage": "https://github.com/scharinger/gantt-task-react",
77
"license": "MIT",
8-
"repository": "MaTeMaTuK/gantt-task-react",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/scharinger/gantt-task-react.git"
11+
},
912
"main": "dist/index.js",
1013
"module": "dist/index.modern.js",
1114
"source": "src/index.tsx",
1215
"engines": {
1316
"node": ">=10"
1417
},
18+
"contributors": [
19+
"MaTeMaTuK <maksym.vikarii@gmail.com> (original author)"
20+
],
1521
"keywords": [
1622
"react",
1723
"gantt",
@@ -21,7 +27,8 @@
2127
"gantt-chart",
2228
"gantt chart",
2329
"react-gantt",
24-
"task"
30+
"task",
31+
"configurable-columns"
2532
],
2633
"scripts": {
2734
"build": "microbundle-crl --no-compress --format modern,cjs",

0 commit comments

Comments
 (0)