Skip to content

Commit 67b0a91

Browse files
committed
feat(setup): add setup script and configuration for project initialization
* Introduced a setup script in `package.json` to streamline project setup. * Added `scaffoldfy.json` for project scaffolding tasks. * Created a template for a clean README to standardize new project documentation. * Updated CONTRIBUTING.md to include guidelines for contributions and code of conduct.
1 parent f245310 commit 67b0a91

8 files changed

Lines changed: 213 additions & 36 deletions

File tree

.github/copilot-instructions.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/copilot/commit-message-style.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others’ private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT EMAIL]. All complaints will be reviewed and investigated promptly and fairly.
38+
39+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
44+
45+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Contributing to chrome-extension-monorepo-template
2+
3+
Thank you for your interest in contributing! 🎉
4+
5+
We welcome all contributions, including bug reports, feature requests, documentation improvements, and code changes.
6+
7+
---
8+
9+
## How to Contribute
10+
11+
1. **Fork the repository** and create your branch from `main`.
12+
2. **Make your changes** with clear, concise commits. Follow the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/).
13+
3. **Add or update tests** to cover your changes.
14+
4. **Run lint and tests** to ensure code quality:
15+
16+
```bash
17+
pnpm run lint
18+
pnpm run test
19+
```
20+
21+
5. **Update documentation** if your change affects usage or public APIs.
22+
6. **Open a pull request** using the provided template. Be sure to:
23+
- Clearly describe your change and why it is needed.
24+
- Link to any related issues (e.g., `Fixes #123`).
25+
- Check all items in the pull-request checklist:
26+
- [ ] Code is up-to-date with the `main` branch
27+
- [ ] `pnpm run lint` passes with this change
28+
- [ ] `pnpm run test` passes with this change
29+
- [ ] This pull request links relevant issues as `Fixes #0000`
30+
- [ ] There are new or updated unit tests validating the change
31+
- [ ] Documentation has been updated to reflect this change
32+
- [ ] The new commits follow conventions outlined in the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/)
33+
34+
---
35+
36+
## Code of Conduct
37+
38+
This project follows a [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
39+
40+
---
41+
42+
## Questions?
43+
44+
If you have questions, open an issue or start a discussion. Thank you for helping make this project better!

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ publishing, and versioning guidance.
1616
If you are new, there's also a simpler introduction in the
1717
[Hello world TypeScript action repository](https://github.com/actions/hello-world-javascript-action).
1818

19+
## 🚀 Getting Started
20+
21+
Run setup after cloning:
22+
23+
```sh
24+
pnpm run setup
25+
```
26+
1927
## Create Your Own Action
2028

2129
To create your own action, you can use this repository as a template! Just

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"node": ">=20"
2727
},
2828
"scripts": {
29+
"setup": "npx @pixpilot/scaffoldfy --config ./setup/scaffoldfy.json",
2930
"bundle": "pnpm run format:write && pnpm run build",
3031
"build": "node esbuild.config.cjs",
3132
"ci-test": "cross-env NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx vitest --run",

setup/scaffoldfy.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"$schema": "https://unpkg.com/@pixpilot/scaffoldfy@latest/schema/scaffoldfy.schema.json",
3+
"extends": [
4+
"https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/project-info/scaffoldfy.json",
5+
"https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/pixpilot-info/scaffoldfy.json",
6+
"https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/turbo-workspace-package-generator/scaffoldfy.json",
7+
"https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/license-file/scaffoldfy.json",
8+
"https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/update-root-package-json/scaffoldfy.json",
9+
"https://unpkg.com/@pixpilot/scaffoldfy-configs@latest/pixpilot-copilot-instructions/scaffoldfy.json"
10+
],
11+
"name": "chrome-extension-monorepo-template-setup",
12+
"tasks": [
13+
{
14+
"id": "clean-readme",
15+
"name": "Clean README",
16+
"description": "Create a fresh README for the new project",
17+
"type": "write",
18+
"config": {
19+
"file": "README.md",
20+
"templateFile": "./templates/clean-readme.md"
21+
}
22+
},
23+
{
24+
"id": "update-contributing",
25+
"name": "Update CONTRIBUTING.md",
26+
"description": "Update contributing guidelines with project info",
27+
"type": "replace-in-file",
28+
"config": {
29+
"file": "CONTRIBUTING.md",
30+
"replacements": [
31+
{
32+
"find": "chrome-extension-monorepo-template",
33+
"replace": "{{repoName}}"
34+
}
35+
]
36+
}
37+
},
38+
{
39+
"id": "remove-setup-script",
40+
"name": "Remove setup script",
41+
"description": "Remove the setup script from package.json after setup is complete",
42+
"type": "regex-replace",
43+
"config": {
44+
"file": "package.json",
45+
"pattern": "\\n\\s*\"setup\":\\s*\"npx @pixpilot/scaffoldfy --config \\./setup/scaffoldfy\\.json\",",
46+
"flags": "",
47+
"replacement": ""
48+
}
49+
},
50+
{
51+
"id": "delete-setup-tasks",
52+
"name": "Delete setup tasks file",
53+
"description": "Remove the setup-tasks.json file after setup is complete",
54+
"type": "delete",
55+
"config": {
56+
"paths": ["setup"]
57+
}
58+
},
59+
{
60+
"id": "install-dependencies",
61+
"name": "Install dependencies",
62+
"description": "Install dependencies after cleanup",
63+
"type": "exec",
64+
"config": {
65+
"command": "pnpm install"
66+
}
67+
}
68+
]
69+
}

setup/templates/clean-readme.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# {{repoName}}
2+
3+
> A modern TypeScript monorepo managed with pnpm and TurboRepo.
4+
5+
## 🚀 Getting Started
6+
7+
### Development
8+
9+
Build all packages:
10+
11+
```sh
12+
pnpm build
13+
```
14+
15+
Run tests:
16+
17+
```sh
18+
pnpm test
19+
```
20+
21+
Lint and format:
22+
23+
```sh
24+
pnpm lint
25+
pnpm format
26+
```
27+
28+
### Create a New Package
29+
30+
Generate a new package in the monorepo:
31+
32+
```sh
33+
pnpm run turbo:gen:init
34+
```
35+
36+
## 📦 Packages
37+
38+
<!-- List your packages here -->
39+
40+
## 🚢 Releases
41+
42+
This project uses [Changesets](https://github.com/changesets/changesets) for version management and publishing.
43+
44+
## 📄 License
45+
46+
[MIT](LICENSE)

0 commit comments

Comments
 (0)