fix: remove NPM usage and integration examples from README.md

This commit is contained in:
sinanisler
2025-12-22 03:10:06 +03:00
parent 4a53020ee1
commit 4d114fa498
-83
View File
@@ -403,89 +403,6 @@ Cycle through Arial (modern sans-serif), Times New Roman (traditional serif), an
</html>
```
### NPM/Module Usage
```javascript
// main.js
import 'accessibility-widgets/widget.js';
// Optional: Configure before import
window.ACCESSIBILITY_WIDGET_CONFIG = {
enableVoiceControl: false,
widgetWidth: '400px'
};
// Widget auto-initializes
```
### React/Vue/Angular Integration
```javascript
// App.jsx (React)
import { useEffect } from 'react';
function App() {
useEffect(() => {
// Configure widget
window.ACCESSIBILITY_WIDGET_CONFIG = {
colors: { primary: '#4caf50' }
};
// Load widget script
const script = document.createElement('script');
script.src = 'https://unpkg.com/accessibility-widgets@latest/widget.js';
script.async = true;
document.body.appendChild(script);
return () => {
// Cleanup if needed
document.body.removeChild(script);
};
}, []);
return <div>Your App Content</div>;
}
```
## 🛠️ Development
```bash
# Clone repository
git clone https://github.com/sinanisler/accessibility-widgets.git
cd accessibility-widgets
# Install dependencies (optional)
npm install
# Start local server
npm run dev
# Opens http://localhost:8000
```
## 📦 NPM Publishing Setup
After setting up your NPM account:
1. **Create NPM Token**:
```bash
npm login
npm token create
```
2. **Add to GitHub Secrets**:
- Go to your repository Settings → Secrets and variables → Actions
- Create new secret: `NPM_TOKEN`
- Paste your NPM token
3. **Publish**:
```bash
# Manual publish
npm publish
# Or create GitHub release to trigger workflow
git tag v2.0.0
git push origin v2.0.0
```
The GitHub Actions workflow will automatically publish to NPM on new releases.
## 🤝 Contributing