Skip to content

Commit 7931d0c

Browse files
committed
chore: Add more project templates
1 parent 6d809eb commit 7931d0c

6 files changed

Lines changed: 664 additions & 0 deletions

File tree

contribs/go-project.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
structure:
2+
- .editorconfig:
3+
content: |
4+
# Editor configuration
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
- .env:
15+
content: |
16+
# Environment variables
17+
- .env.example:
18+
content: |
19+
# Environment variables
20+
- .gitignore:
21+
content: |
22+
# Ignore files generated by the app
23+
.env
24+
.venv
25+
- LICENSE:
26+
file: https://raw.githubusercontent.com/httpdss/struct/main/LICENSE
27+
- README.md:
28+
content: |
29+
# Generic App
30+
31+
## Introduction
32+
33+
This is a generic app that can be used as a template for new projects.
34+
35+
## Contribute
36+
37+
If you would like to contribute to this project, please follow the guidelines in the [CONTRIBUTING.md](.github/CONTRIBUTING.md) file.
38+
39+
## License
40+
41+
This project is licensed under the terms of the [Apache 2.0](LICENSE) license.
42+
- main.go:
43+
content: |
44+
package main
45+
46+
import "fmt"
47+
48+
func main() {
49+
fmt.Println("Hello, World!")
50+
}
51+
- cmd/project_name/main.go:
52+
content: |
53+
package main
54+
55+
import "fmt"
56+
57+
func main() {
58+
fmt.Println("Hello, World!")
59+
}
60+
- pkg/project_name/module1.go:
61+
content: |
62+
package project_name
63+
64+
import "fmt"
65+
66+
func Module1() {
67+
fmt.Println("Module 1")
68+
}
69+
- pkg/project_name/module2.go:
70+
content: |
71+
package project_name
72+
73+
import "fmt"
74+
75+
func Module2() {
76+
fmt.Println("Module 2")
77+
}
78+
- internal/project_name/util.go:
79+
content: |
80+
package project_name
81+
82+
import "fmt"
83+
84+
func Util() {
85+
fmt.Println("Util")
86+
}
87+
- api/v1/api.go:
88+
content: |
89+
package v1
90+
91+
import "fmt"
92+
93+
func API() {
94+
fmt.Println("API")
95+
}
96+
- test/main_test.go:
97+
content: |
98+
package main
99+
100+
import "testing"
101+
102+
func TestMain(t *testing.T) {
103+
t.Log("Testing main")
104+
}

contribs/java-project.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
structure:
2+
- .editorconfig:
3+
content: |
4+
# Editor configuration
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
- .env:
15+
content: |
16+
# Environment variables
17+
- .env.example:
18+
content: |
19+
# Environment variables
20+
- .gitignore:
21+
content: |
22+
# Ignore files generated by the app
23+
.env
24+
.venv
25+
- LICENSE:
26+
file: https://raw.githubusercontent.com/httpdss/struct/main/LICENSE
27+
- README.md:
28+
content: |
29+
# Generic App
30+
31+
## Introduction
32+
33+
This is a generic app that can be used as a template for new projects.
34+
35+
## Contribute
36+
37+
If you would like to contribute to this project, please follow the guidelines in the [CONTRIBUTING.md](.github/CONTRIBUTING.md) file.
38+
39+
## License
40+
41+
This project is licensed under the terms of the [Apache 2.0](LICENSE) license.
42+
- pom.xml:
43+
content: |
44+
<project xmlns="http://maven.apache.org/POM/4.0.0"
45+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
46+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
47+
<modelVersion>4.0.0</modelVersion>
48+
<groupId>com.example</groupId>
49+
<artifactId>project_name</artifactId>
50+
<version>0.1.0</version>
51+
<packaging>jar</packaging>
52+
<name>project_name</name>
53+
<description>A new Java project</description>
54+
<properties>
55+
<maven.compiler.source>1.8</maven.compiler.source>
56+
<maven.compiler.target>1.8</maven.compiler.target>
57+
</properties>
58+
</project>
59+
- src/main/java/com/example/App.java:
60+
content: |
61+
package com.example;
62+
63+
public class App {
64+
public static void main(String[] args) {
65+
System.out.println("Hello, World!");
66+
}
67+
}
68+
- src/main/resources/REMOVE_ME.md:
69+
content: |
70+
# Resources
71+
72+
Resource files like configuration files
73+
- src/test/java/com/example/AppTest.java:
74+
content: |
75+
package com.example;
76+
77+
import org.junit.Test;
78+
import static org.junit.Assert.*;
79+
80+
public class AppTest {
81+
@Test
82+
public void testApp() {
83+
assertTrue(true);
84+
}
85+
}

contribs/nodejs-project.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
structure:
2+
- .editorconfig:
3+
content: |
4+
# Editor configuration
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 2
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
- .env:
15+
content: |
16+
# Environment variables
17+
- .env.example:
18+
content: |
19+
# Environment variables
20+
- .gitignore:
21+
content: |
22+
# Ignore files generated by the app
23+
.env
24+
.venv
25+
- LICENSE:
26+
file: https://raw.githubusercontent.com/httpdss/struct/main/LICENSE
27+
- README.md:
28+
content: |
29+
# Generic App
30+
31+
## Introduction
32+
33+
This is a generic app that can be used as a template for new projects.
34+
35+
## Contribute
36+
37+
If you would like to contribute to this project, please follow the guidelines in the [CONTRIBUTING.md](.github/CONTRIBUTING.md) file.
38+
39+
## License
40+
41+
This project is licensed under the terms of the [Apache 2.0](LICENSE) license.
42+
- package.json:
43+
content: |
44+
{
45+
"name": "project_name",
46+
"version": "0.1.0",
47+
"description": "A new Node.js project",
48+
"main": "index.js",
49+
"scripts": {
50+
"test": "echo \"Error: no test specified\" && exit 1"
51+
},
52+
"keywords": [],
53+
"author": "",
54+
"license": "Apache-2.0",
55+
"dependencies": {},
56+
"devDependencies": {}
57+
}
58+
- test/index.test.js:
59+
content: |
60+
const assert = require('assert');
61+
62+
describe('Array', function() {
63+
describe('#indexOf()', function() {
64+
it('should return -1 when the value is not present', function() {
65+
assert.strictEqual([1, 2, 3].indexOf(4), -1);
66+
});
67+
});
68+
});
69+
- src/index.js:
70+
content: |
71+
console.log('Hello, World!');
72+
- src/utils.js:
73+
content: |
74+
function add(a, b) {
75+
return a + b;
76+
}
77+
78+
function sub(a, b) {
79+
return a - b;
80+
}
81+
82+
module.exports = { add, sub };
83+
- public/index.html:
84+
content: |
85+
<!DOCTYPE html>
86+
<html lang="en">
87+
<head>
88+
<meta charset="UTF-8">
89+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
90+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
91+
<title>Document</title>
92+
</head>
93+
<body>
94+
<h1>Hello, World!</h1>
95+
</body>
96+
</html>
97+
- public/styles.css:
98+
content: |
99+
body {
100+
font-family: Arial, sans-serif;
101+
}

0 commit comments

Comments
 (0)