@jttc/projen-project-types 1.0.0-beta.1 β 1.0.0-beta.3
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/.cz-config.js +8 -1
- package/.jsii +440 -5
- package/API.md +9621 -252
- package/README.md +186 -29
- package/docs/components/cdk8s.md +724 -0
- package/docs/index.md +74 -13
- package/docs/project-types/cdk-app.md +481 -0
- package/docs/project-types/cdk-library.md +16 -108
- package/docs/project-types/cdk8s-library.md +442 -0
- package/lib/cdk/cdk-app-project.d.ts +9 -0
- package/lib/cdk/cdk-app-project.js +27 -0
- package/lib/cdk/cdk-library-project.js +1 -1
- package/lib/cdk/cdk8s-library-project.d.ts +12 -0
- package/lib/cdk/cdk8s-library-project.js +37 -0
- package/lib/common/common-options.d.ts +1 -0
- package/lib/common/common-options.js +10 -3
- package/lib/components/cdk8s/cdk8s.d.ts +11 -0
- package/lib/components/cdk8s/cdk8s.js +98 -0
- package/lib/components/cdk8s/index.d.ts +2 -0
- package/lib/components/cdk8s/index.js +19 -0
- package/lib/components/cdk8s/interfaces/Cdk8s.d.ts +39 -0
- package/lib/components/cdk8s/interfaces/Cdk8s.js +12 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +18 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -1
- package/mkdocs.yml +4 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,55 +1,212 @@
|
|
|
1
|
-
# Projen Project Types
|
|
1
|
+
# ποΈ Projen Project Types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Opinionated project templates for [projen.io](https://projen.io) that accelerate development with best practices built-in**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@jttc/projen-project-types)
|
|
6
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
|
+
[](https://jumptothecloud.github.io/projen-project-types/)
|
|
8
|
+
[](https://github.com/JumpToTheCloud/projen-project-types)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## β¨ What is this?
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
This package provides **ready-to-use project templates** that extend [projen](https://projen.io) with opinionated configurations, saving you hours of setup time while ensuring consistency and best practices across your projects.
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Instead of manually configuring Prettier, ESLint, VSCode settings, CI/CD pipelines, and other tools for every project, these templates give you everything pre-configured and battle-tested.
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
## π Quick Start
|
|
14
17
|
|
|
15
18
|
```bash
|
|
16
|
-
#
|
|
17
|
-
|
|
19
|
+
# Create a CDK construct library
|
|
20
|
+
npx projen new --from @jttc/projen-project-types cdk-library
|
|
18
21
|
|
|
19
|
-
#
|
|
20
|
-
|
|
22
|
+
# Create a CDK application
|
|
23
|
+
npx projen new --from @jttc/projen-project-types cdk-app
|
|
24
|
+
|
|
25
|
+
# Create a CDK8s construct library with Kubernetes support
|
|
26
|
+
npx projen new --from @jttc/projen-project-types cdk8s-library
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
## π¦ Available Project Types
|
|
30
|
+
|
|
31
|
+
| Project Type | Description | Best For |
|
|
32
|
+
|--------------|-------------|----------|
|
|
33
|
+
| **[CDK Library](https://jumptothecloud.github.io/projen-project-types/project-types/cdk-library/)** | AWS CDK construct libraries | Creating reusable AWS infrastructure components |
|
|
34
|
+
| **[CDK App](https://jumptothecloud.github.io/projen-project-types/project-types/cdk-app/)** | AWS CDK applications | Building and deploying AWS infrastructure |
|
|
35
|
+
| **[CDK8s Library](https://jumptothecloud.github.io/projen-project-types/project-types/cdk8s-library/)** | CDK8s libraries with Kubernetes | Creating reusable Kubernetes constructs |
|
|
36
|
+
|
|
37
|
+
## π§© Available Components
|
|
38
|
+
|
|
39
|
+
| Component | Description | Documentation |
|
|
40
|
+
|-----------|-------------|---------------|
|
|
41
|
+
| **[CDK8s Component](https://jumptothecloud.github.io/projen-project-types/components/cdk8s/)** | Kubernetes manifest generation with TypeScript | Add to any project type |
|
|
42
|
+
|
|
43
|
+
## β‘ What You Get Out of the Box
|
|
44
|
+
|
|
45
|
+
Every project template includes:
|
|
46
|
+
|
|
47
|
+
- π¨ **[Prettier](https://jumptothecloud.github.io/projen-project-types/default-configurations/#prettier-configuration)** - Consistent code formatting
|
|
48
|
+
- π§ **[VSCode Setup](https://jumptothecloud.github.io/projen-project-types/default-configurations/#vscode-configuration)** - Optimized editor experience with recommended extensions
|
|
49
|
+
- π **TypeScript** - Best practices and configurations
|
|
50
|
+
- π§ͺ **Jest Testing** - Ready-to-use testing framework
|
|
51
|
+
- π’ **CI/CD Pipelines** - GitHub Actions workflows
|
|
52
|
+
- π **Documentation** - Auto-generated API docs
|
|
53
|
+
- π **Security** - Dependabot and security scanning
|
|
54
|
+
|
|
55
|
+
## π‘ Example Usage
|
|
56
|
+
|
|
57
|
+
### CDK Library with Custom Configuration
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// .projenrc.ts
|
|
61
|
+
import { CdkLibrary } from '@jttc/projen-project-types';
|
|
62
|
+
|
|
63
|
+
const project = new CdkLibrary({
|
|
64
|
+
name: 'my-awesome-constructs',
|
|
65
|
+
author: 'Your Name',
|
|
66
|
+
authorAddress: 'your@email.com',
|
|
67
|
+
repositoryUrl: 'https://github.com/yourusername/my-awesome-constructs.git',
|
|
68
|
+
cdkVersion: '2.1.0',
|
|
69
|
+
defaultReleaseBranch: 'main',
|
|
70
|
+
|
|
71
|
+
// Customize as needed
|
|
72
|
+
prettier: true,
|
|
73
|
+
vscode: true,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
project.synth();
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### CDK8s Library with Kubernetes Support
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// .projenrc.ts
|
|
83
|
+
import { Cdk8sLibrary, K8sVersion } from '@jttc/projen-project-types';
|
|
84
|
+
|
|
85
|
+
const project = new Cdk8sLibrary({
|
|
86
|
+
name: 'my-k8s-constructs',
|
|
87
|
+
author: 'Your Name',
|
|
88
|
+
authorAddress: 'your@email.com',
|
|
89
|
+
repositoryUrl: 'https://github.com/yourusername/my-k8s-constructs.git',
|
|
90
|
+
cdkVersion: '2.1.0',
|
|
91
|
+
defaultReleaseBranch: 'main',
|
|
92
|
+
|
|
93
|
+
// CDK8s specific options
|
|
94
|
+
k8sVersion: K8sVersion.V1_31,
|
|
95
|
+
appPath: 'src/k8s',
|
|
96
|
+
imports: ['cert-manager@v1.13.0'],
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
project.synth();
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## ποΈ Architecture
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
projen-project-types/
|
|
106
|
+
βββ π Project Types/ # Complete project templates
|
|
107
|
+
β βββ CDK Library # AWS CDK construct libraries
|
|
108
|
+
β βββ CDK App # AWS CDK applications
|
|
109
|
+
β βββ CDK8s Library # Kubernetes + CDK8s libraries
|
|
110
|
+
βββ π§© Components/ # Reusable functionality
|
|
111
|
+
β βββ CDK8s Component # Kubernetes manifest generation
|
|
112
|
+
βββ βοΈ Common Config/ # Shared configurations
|
|
113
|
+
βββ Prettier # Code formatting
|
|
114
|
+
βββ VSCode # Editor setup
|
|
115
|
+
βββ TypeScript # Language configuration
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## π Documentation
|
|
119
|
+
|
|
120
|
+
Comprehensive documentation is available at: **[jumptothecloud.github.io/projen-project-types](https://jumptothecloud.github.io/projen-project-types/)**
|
|
24
121
|
|
|
25
|
-
|
|
122
|
+
- **[Getting Started Guide](https://jumptothecloud.github.io/projen-project-types/)**
|
|
123
|
+
- **[Project Types](https://jumptothecloud.github.io/projen-project-types/project-types/cdk-library/)**
|
|
124
|
+
- **[Components](https://jumptothecloud.github.io/projen-project-types/components/cdk8s/)**
|
|
125
|
+
- **[Default Configurations](https://jumptothecloud.github.io/projen-project-types/default-configurations/)**
|
|
126
|
+
|
|
127
|
+
## π οΈ Development
|
|
128
|
+
|
|
129
|
+
### Prerequisites
|
|
130
|
+
|
|
131
|
+
- **Node.js** (v18+)
|
|
132
|
+
- **Yarn** package manager
|
|
133
|
+
- **Python 3** (for documentation)
|
|
134
|
+
|
|
135
|
+
### Setup
|
|
26
136
|
|
|
27
137
|
```bash
|
|
28
|
-
#
|
|
29
|
-
|
|
138
|
+
# Clone the repository
|
|
139
|
+
git clone https://github.com/JumpToTheCloud/projen-project-types.git
|
|
140
|
+
cd projen-project-types
|
|
141
|
+
|
|
142
|
+
# Install dependencies
|
|
143
|
+
yarn install
|
|
30
144
|
|
|
31
|
-
#
|
|
145
|
+
# Run tests
|
|
146
|
+
yarn test
|
|
147
|
+
|
|
148
|
+
# Build the project
|
|
149
|
+
yarn build
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Documentation Development
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Install documentation dependencies
|
|
156
|
+
pip3 install mkdocs mkdocs-material mike
|
|
157
|
+
|
|
158
|
+
# Serve documentation locally with hot reload
|
|
32
159
|
yarn docs:serve
|
|
160
|
+
|
|
161
|
+
# Build documentation
|
|
162
|
+
yarn docs:build
|
|
33
163
|
```
|
|
34
164
|
|
|
35
|
-
The documentation will be available at `http://localhost:
|
|
165
|
+
The documentation will be available at `http://localhost:8099` when using the serve command.
|
|
166
|
+
|
|
167
|
+
## πΊοΈ Roadmap
|
|
168
|
+
|
|
169
|
+
Planned features and project types:
|
|
170
|
+
|
|
171
|
+
- **Next.js Projects** - Full-stack TypeScript applications
|
|
172
|
+
- **Node.js APIs** - REST and GraphQL API templates
|
|
173
|
+
- **React Libraries** - Component library templates
|
|
174
|
+
- **Terraform Modules** - Infrastructure as Code templates
|
|
175
|
+
- **Docker Components** - Containerization support
|
|
176
|
+
- **Serverless Functions** - AWS Lambda and other FaaS templates
|
|
177
|
+
|
|
178
|
+
## π€ Contributing
|
|
179
|
+
|
|
180
|
+
We welcome contributions! Here's how to get started:
|
|
181
|
+
|
|
182
|
+
1. **Fork the repository**
|
|
183
|
+
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
|
|
184
|
+
3. **Make your changes** and add tests
|
|
185
|
+
4. **Run tests**: `yarn test`
|
|
186
|
+
5. **Update documentation** if needed
|
|
187
|
+
6. **Commit your changes**: `git commit -m 'Add amazing feature'`
|
|
188
|
+
7. **Push to the branch**: `git push origin feature/amazing-feature`
|
|
189
|
+
8. **Open a Pull Request**
|
|
190
|
+
|
|
191
|
+
### Contribution Guidelines
|
|
36
192
|
|
|
37
|
-
|
|
193
|
+
- All new features should include tests
|
|
194
|
+
- Documentation should be updated for new project types or components
|
|
195
|
+
- Follow the existing code style and patterns
|
|
196
|
+
- Ensure all CI checks pass
|
|
38
197
|
|
|
39
|
-
|
|
40
|
-
- π¦ **Integrated tooling** with sensible defaults
|
|
41
|
-
- π§ **Customizable configurations** to fit your needs
|
|
42
|
-
- π **Comprehensive documentation** with MkDocs Material theme
|
|
43
|
-
- π **Continuous integration** templates included
|
|
198
|
+
## β Support
|
|
44
199
|
|
|
45
|
-
|
|
200
|
+
- **Documentation**: [jumptothecloud.github.io/projen-project-types](https://jumptothecloud.github.io/projen-project-types/)
|
|
201
|
+
- **Issues**: [GitHub Issues](https://github.com/JumpToTheCloud/projen-project-types/issues)
|
|
202
|
+
- **Discussions**: [GitHub Discussions](https://github.com/JumpToTheCloud/projen-project-types/discussions)
|
|
46
203
|
|
|
47
|
-
|
|
204
|
+
## π License
|
|
48
205
|
|
|
49
|
-
|
|
206
|
+
This project is licensed under the **Apache 2.0 License** - see the [LICENSE](LICENSE) file for details.
|
|
50
207
|
|
|
51
|
-
|
|
208
|
+
## π Credits
|
|
52
209
|
|
|
53
|
-
|
|
210
|
+
Built with β€οΈ by the [JumpToTheCloud](https://github.com/JumpToTheCloud) team.
|
|
54
211
|
|
|
55
|
-
|
|
212
|
+
Special thanks to the [projen](https://projen.io) community for creating such an amazing tool for project configuration management.
|