Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ authors:
orcid: https://orcid.org/0009-0001-1641-9397
identifiers:
- type: url
value: https://github.com/caffeine-addictt/template/releases/tag/v1.12.3
description: The GitHub release URL of tag v1.12.3.
value: https://github.com/caffeine-addictt/template/releases/tag/v1.14.0
description: The GitHub release URL of tag v1.14.0.
cff-version: 1.2.0
date-released: 2024-05-12
date-released: 2024-08-09
keywords:
- template
- bash
- node
- nodejs
- setup
- script
- typescript
- github
license: MIT
message: If you use this software, please cite it using these metadata.
repository-code: https://github.com/caffeine-addictt/template
title: template
type: software
version: 1.12.3
version: 1.14.0
26 changes: 22 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,35 @@ please follow it in all your interactions with the project.
<!-- prettier-ignore-start -->
<!--toc:start-->

1. [Pull Request Process](#pull-request-process)
2. [Issue Report Process](#issue-report-process)
3. [Commit Message Guidelines](#commit-message-guidelines)
4. [Code Quality](#code-quality)
1. [Getting started](#getting-started)
2. [Pull Request Process](#pull-request-process)
3. [Issue Report Process](#issue-report-process)
4. [Commit Message Guidelines](#commit-message-guidelines)
5. [Code Quality](#code-quality)
- [Testing](#testing)
- [Linting](#linting)
- [Building](#building)

<!--toc:end-->
<!-- prettier-ignore-end -->

## Getting started

Contributions are what make the open source community
such an amazing place to learn, inspire, and create.
Any contributions you make are **greatly appreciated**. ( ˶ˆᗜˆ˵ )

If you have a suggestion that would make this better,
please fork the repo and create a pull request.
You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer
Expand Down
166 changes: 81 additions & 85 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,75 @@
<!-- Allow HTML -->
<!-- markdownlint-disable MD033 -->
###### _<div align="right"><sub>// made with <3</sub></div>_

<!-- Allow HTML top-level heading -->
<!-- markdownlint-disable MD041 -->
<div align="center">

<a name="readme-top"></a>
<!-- Project Banner -->

<!-- PROJECT SHIELDS -->
<div align="center">
<a href="https://github.com/caffeine-addictt/template">
<img src="https://github.com/caffeine-addictt/template/blob/main/assets/transparent-logo.svg" width="750" height="300" alt="">
</a>

<a href="[forks-url]">[![Forks][forks-shield]][forks-url]</a>
<a href="[stars-url]">[![Stargazers][stars-shield]][stars-url]</a>
<a href="[license-url]">[![MIT License][license-shield]][license-url]</a>
<br>

</div>
<!-- Badges -->

<!-- PROJECT LOGO -->
<br />
<div align="center">
<h3 align="center">Repository Template</h3>

<p align="center">
Simple repository template to get started with GitHub.
<br />
<br />
<a href="https://github.com/caffeine-addictt/template/issues">Report Bug</a>
·
<a href="https://github.com/caffeine-addictt/template/issues">Request Feature</a>
</p>
</div>
![badge-workflow]
[![badge-license]][license]
![badge-language]
[![badge-pr]][prs]
[![badge-issues]][issues]

<!-- ABOUT THE PROJECT -->
<br><br>

## About The Project
<!-- Description -->

A simple repository template to get started with GitHub.

Starting a new project?
Say goodbye to repetitive setup tasks and configuration headaches!
Simplify your workflow, save time, and ensure consistency across projects.

Let's make starting new projects feel like a _breeze_ again.
Let's make starting new projects feel like a **_breeze_** again.

<br><br>

---

<p align="right">(<a href="#readme-top">back to top</a>)</p>
<!-- TOC -->

## Getting Started
**[<kbd> <br> Features <br> </kbd>](#features)**
**[<kbd> <br> Quick Start <br> </kbd>](#quick-start)**
**[<kbd> <br> Contribute <br> </kbd>][contribute]**

---

<br>

</div>

# Features

- Beautiful README
- Matrix testing CI
- Draft Releasing CI
- Pull Request Labeler CI
- Code of Conduct
- Code Style Documentation
- Security Policy Documentation
- 7 Issue Templates
- Pull Request Template
- And more...

<div align="right">
<br>
<a href="#-made-with-3"><kbd> <br> 🡅 <br> </kbd></a>
</div>

# Quick Start

### 1. Creating a repository

Click the green "Use this template" button in the top right corner of the page
or the button below to create your new repository.

[![Use Template][use-shield]][use-url]
[![Use Template][badge-use]][use-url]

### 2. Run the setup script

Expand Down Expand Up @@ -85,67 +103,45 @@ Just a few more steps and you're ready to go!

Want to support this project? **✨ Star it on GitHub** and help us spread the word!

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community
such an amazing place to learn, inspire, and create.
Any contributions you make are **greatly appreciated**. ( ˶ˆᗜˆ˵ )

If you have a suggestion that would make this better,
please fork the repo and create a pull request.
You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Read our [contributing guide](./CONTRIBUTING.md) for more information.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- LICENSE -->

## License
<div align="right">
<br>
<a href="#-made-with-3"><kbd> <br> 🡅 <br> </kbd></a>
</div>

Distributed under the MIT License. See [LICENSE.txt](./LICENSE.txt) for more information.
## Special Thanks

<p align="right">(<a href="#readme-top">back to top</a>)</p>
- **[Img Shields][img-shields]** - _For the awesome README badges_
- **[Hyprland][hyprland]** - _For showing how to make beautiful READMEs_
- **[Hyprdots][hyprdots]** - _For showing how to make beautiful READMEs_

<!-- CONTACT -->
---

## Contact
![stars-graph]

Alex - [contact@ngjx.org](mailto:contact@ngjx.org)
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

<p align="right">(<a href="#readme-top">back to top</a>)</p>
[stars-graph]: https://starchart.cc/caffeine-addictt/template.svg?variant=adaptive
[prs]: https://github.com/caffeine-addictt/template/pulls
[issues]: https://github.com/caffeine-addictt/template/issues
[license]: https://github.com/caffeine-addictt/template/blob/main/LICENSE

<!-- ACKNOWLEDGMENTS -->
<!---------------- {{Links}} ---------------->

## Acknowledgments
[use-url]: https://github.com/new?template_name=template&template_owner=caffeine-addictt
[contribute]: https://github.com/caffeine-addictt/template/blob/main/CONTRIBUTING.md

- [Choose an Open Source License](https://choosealicense.com)
- [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet)
- [Malven's Flexbox Cheatsheet](https://flexbox.malven.co/)
- [Malven's Grid Cheatsheet](https://grid.malven.co/)
- [Img Shields](https://shields.io)
<!---------------- {{Thanks}} ---------------->

<p align="right">(<a href="#readme-top">back to top</a>)</p>
[hyprland]: https://github.com/hyprwm/Hyprland
[hyprdots]: https://github.com/prasanthrangan/hyprdots
[img-shields]: https://shields.io

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
<!---------------- {{Badges}} ---------------->

[forks-shield]: https://img.shields.io/github/forks/caffeine-addictt/template.svg?style=for-the-badge
[forks-url]: https://github.com/caffeine-addictt/template/network/members
[stars-shield]: https://img.shields.io/github/stars/caffeine-addictt/template.svg?style=for-the-badge&color=yellow
[stars-url]: https://github.com/caffeine-addictt/template/stargazers
[license-shield]: https://img.shields.io/github/license/caffeine-addictt/template.svg?style=for-the-badge
[license-url]: https://github.com/caffeine-addictt/template/blob/master/LICENSE.txt
[use-shield]: https://img.shields.io/badge/Use%20template-FFFFFF?style=for-the-badge
[use-url]: https://github.com/new?template_name=template&template_owner=caffeine-addictt
[badge-workflow]: https://github.com/caffeine-addictt/template/actions/workflows/test-worker.yml/badge.svg
[badge-issues]: https://img.shields.io/github/issues/caffeine-addictt/template
[badge-pr]: https://img.shields.io/github/issues-pr/caffeine-addictt/template
[badge-language]: https://img.shields.io/github/languages/top/caffeine-addictt/template
[badge-license]: https://img.shields.io/github/license/caffeine-addictt/template
[badge-use]: https://img.shields.io/badge/Use%20template-FFFFFF?style=for-the-badge
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/transparent-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/io-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const replaceInFile = (filePath, _tempDir, data) => new Promise((resolve) => {
// Revert to legacy
let fileContent = fs_1.default.readFileSync(filePath, 'utf8');
fileContent = fileContent
.replace(/{{REPOSITORY}}/g, data.repository)
.replace(/{{REPOSITORY}}/g, `${data.username}/${data.repository}`)
.replace(/{{PROJECT_NAME}}/g, data.proj_name)
.replace(/{{PROJECT_SHORT_DESCRIPTION}}/g, data.proj_short_desc)
.replace(/{{PROJECT_LONG_DESCRIPTION}}/g, data.proj_long_desc)
Expand Down
16 changes: 16 additions & 0 deletions dist/parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractRepoInfo = void 0;
/** Extract username/org and repo from url */
const extractRepoInfo = (url) => {
const originUrl = url.trim();
const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?$/.exec(originUrl);
if (!match || !match[1] || !match[2])
throw new AggregateError(`Could not extract user and repo from git remote: ${originUrl}`);
return {
url: originUrl,
org: match[1],
repo: match[2],
};
};
exports.extractRepoInfo = extractRepoInfo;
35 changes: 35 additions & 0 deletions dist/resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use strict";
/**
* This file will hold the configuration options to make the setup script not so annoying
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveUserInfo = exports.resolveRepoInfo = void 0;
const parser_1 = require("./parser");
const term_1 = require("./term");
const resolveRepoInfo = () => (0, term_1.execute)('git', ['remote', 'get-url', 'origin'])
.then((_originUrl) => (0, parser_1.extractRepoInfo)(_originUrl.toString()))
.catch(() => ({}));
exports.resolveRepoInfo = resolveRepoInfo;
const resolveUserInfo = async () => {
const promises = await Promise.all([
(0, term_1.execute)('git', ['config', '--global', 'user.name'])
.then((r) => r.toString().trim())
.catch(() => undefined),
(0, term_1.execute)('git', ['config', '--global', 'user.email'])
.then((r) => r.toString().trim())
.catch(() => undefined),
]);
return {
name: promises[0],
email: promises[1],
};
};
exports.resolveUserInfo = resolveUserInfo;
const resolveGitInfo = async () => {
const promises = await Promise.all([(0, exports.resolveRepoInfo)(), (0, exports.resolveUserInfo)()]);
return {
...promises[0],
...promises[1],
};
};
exports.default = resolveGitInfo;
Loading