You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-25Lines changed: 28 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Web Component Starter Template
2
2
3
-
A comprehensive, production-ready starter template for creating Web Components. This template is based on the architecture and best practices from my web components work.
3
+
A comprehensive, production-ready starter template for creating Web Components. This template is based on the architecture and best practices from my web components work, incorporating [Google's Custom Element Best Practices](https://web.dev/articles/custom-elements-best-practices).
4
4
5
5
## ✨ Features
6
6
7
7
-**Modern Tooling**: Vitest, ESLint, Prettier, Happy DOM
8
-
-**Best Practices**: Shadow DOM, Custom Elements v1, proper encapsulation
8
+
-**Best Practices**: Shadow DOM, Custom Elements v1, proper encapsulation, following [Google's recommendations](https://web.dev/articles/custom-elements-best-practices)
9
9
-**Multiple Import Options**: Auto-define, manual definition, or both
10
10
-**Testing**: Comprehensive test setup with coverage reporting
11
11
-**CI/CD**: GitHub Actions workflows included
@@ -48,34 +48,35 @@ If you prefer manual setup, see [SETUP.md](SETUP.md) for detailed instructions.
48
48
49
49
```
50
50
web-component-starter/
51
-
├── COMPONENT-NAME.js # Component implementation
52
-
├── index.js # Main entry (class + auto-define)
53
-
├── define.js # Auto-define only
54
-
├── custom-elements.json # Custom Elements Manifest
55
-
├── package.json # Package config with scripts
56
-
├── LICENSE # MIT License
57
-
├── README.md # This file (replaced after setup)
58
-
├── README.tpl # Template for your component's README
59
-
├── .gitignore # Git ignore
60
-
├── .npmignore # npm ignore
61
-
├── .prettierrc # Prettier config
62
-
├── .editorconfig # Editor config
63
-
├── eslint.config.js # ESLint config
64
-
├── vitest.config.js # Vitest config
51
+
├── COMPONENT-NAME.js # Component implementation
52
+
├── index.js # Main entry (class + auto-define)
53
+
├── define.js # Auto-define only
54
+
├── custom-elements.json # Custom Elements Manifest
55
+
├── package.json # Package config with scripts
56
+
├── LICENSE # MIT License
57
+
├── README.md # This file (replaced after setup)
58
+
├── README.tpl # Template for your component's README
59
+
├── WEB-COMPONENTS-BEST-PRACTICES.md # Best practices documentation
60
+
├── .gitignore # Git ignore
61
+
├── .npmignore # npm ignore
62
+
├── .prettierrc # Prettier config
63
+
├── .editorconfig # Editor config
64
+
├── eslint.config.js # ESLint config
65
+
├── vitest.config.js # Vitest config
65
66
├── .github/
66
67
│ ├── workflows/
67
-
│ │ ├── ci.yml # Continuous integration
68
-
│ │ └── publish.yml # Auto-publish to npm
69
-
│ └── ISSUE_TEMPLATE/ # Bug & feature templates
68
+
│ │ ├── ci.yml # Continuous integration
69
+
│ │ └── publish.yml # Auto-publish to npm
70
+
│ └── ISSUE_TEMPLATE/ # Bug & feature templates
70
71
├── scripts/
71
-
│ └── setup.js # Interactive setup wizard (removed after setup)
72
+
│ └── setup.js # Interactive setup wizard (removed after setup)
72
73
├── test/
73
-
│ ├── setup.js # Test configuration
74
-
│ └── COMPONENT-NAME.test.js # Test suite
74
+
│ ├── setup.js # Test configuration
75
+
│ └── COMPONENT-NAME.test.js # Test suite
75
76
├── demo/
76
-
│ └── index.html # Live demo page
77
-
├── SETUP.md # Manual setup guide (removed after setup)
78
-
└── CONTRIBUTING.md # Contribution guidelines
77
+
│ └── index.html # Live demo page
78
+
├── SETUP.md # Manual setup guide (removed after setup)
79
+
└── CONTRIBUTING.md # Contribution guidelines
79
80
```
80
81
81
82
## 🛠️ Development
@@ -191,6 +192,7 @@ For legacy browsers, use polyfills.
191
192
192
193
## 📚 Documentation
193
194
195
+
-[WEB-COMPONENTS-BEST-PRACTICES.md](WEB-COMPONENTS-BEST-PRACTICES.md) - Explanation of best practices used in this template
194
196
-[SETUP.md](SETUP.md) - Detailed setup instructions (removed after setup)
0 commit comments