Skip to content

Commit

Permalink
refactor(core): change template to project (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismayta committed Nov 9, 2024
1 parent cd74576 commit 2d088c7
Show file tree
Hide file tree
Showing 33 changed files with 1,598 additions and 1,273 deletions.
2 changes: 1 addition & 1 deletion .chglog/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/hadenlabs/zsh-plugin-template
repository_url: https://github.com/hadenlabs/zsh-deno
options:
commits:
filters:
Expand Down
6 changes: 3 additions & 3 deletions .ci/linters/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: zsh-plugin-name
project_name: zsh-deno
env:
- GO111MODULE=on
- REPO=github.com/hadenlabs/zsh-plugin-template
- REPO=github.com/hadenlabs/zsh-deno
before:
hooks:
- go mod download
Expand Down Expand Up @@ -67,7 +67,7 @@ changelog:
release:
github:
owner: hadenlabs
name: zsh-plugin-name
name: zsh-deno
draft: true
prerelease: auto
name_template: "{{.ProjectName}}-v{{.Version}}-{{.ShortCommit}}-{{.Date}}"
2 changes: 1 addition & 1 deletion .ci/linters/markdown-link-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"baseUrl": "https://github.com/hadenlabs/zsh-plugin-template",
"baseUrl": "https://github.com/hadenlabs/zsh-deno",
"ignorePatterns": [
{
"pattern": "^https://hadenlabs.com"
Expand Down
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# **NOTE**: please check the following document docs/env-vars.md
APP_NAME=zsh-plugin-template
APP_NAME=zsh-deno
SONAR_URL=
SONAR_TOKEN=
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ repos:
go.sum|
)$
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.16.0
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@hadenlabs/commitlint-config"]
args:
- --config=.ci/linters/.commitlintrc.json
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: detect-private-key
files: ^(?!\.?git-crypt)
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.7
3.11.5
10 changes: 5 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Security ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Security ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Security -->
<!-- Include: docs/disclaimer.md -->
<!-- Include: ac:toc -->
Expand All @@ -10,6 +10,6 @@

## Reporting a Security Bug

If you think you have discovered a security issue in any of the zsh-plugin-template projects, we'd love to hear from you. We will take all security bugs seriously and if confirmed upon investigation we will patch it within a reasonable amount of time and release a public security bulletin discussing the impact and credit the discoverer.
If you think you have discovered a security issue in any of the zsh-deno projects, we'd love to hear from you. We will take all security bugs seriously and if confirmed upon investigation we will patch it within a reasonable amount of time and release a public security bulletin discussing the impact and credit the discoverer.

There are two ways to report a security bug. The easiest is to email a description of the flaw and any related information (e.g. reproduction steps, version) to [security at zsh-plugin-template dot org](mailto:[email protected]).
There are two ways to report a security bug. The easiest is to email a description of the flaw and any related information (e.g. reproduction steps, version) to [security at zsh-deno dot org](mailto:[email protected]).
8 changes: 4 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ dotenv:
- .env

vars:
PROJECT_NAME: zsh-plugin-name
PROJECT_NAME: zsh-deno
GROUP_NAME: hadenlabs
ORGANIZATION: hadenlabs
DOCKER_PLATFORM: linux/amd64
REVIEWERS: luismayta
PYTHON_VERSION: 3.11.7
NODE_VERSION: 18.18.2
TERRAFORM_VERSION: 1.8.4
PYTHON_VERSION: 3.11.5
NODE_VERSION: 18.19.1
TERRAFORM_VERSION: 1.9.5
GIT_IGNORES: python,node,go,zsh,sonar,java,maven,intellij+all,terraform,linux
GOLANGCI_VERSION: 1.42.0
README_FILE: README.md
Expand Down
8 changes: 4 additions & 4 deletions config/base.zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ksh
# -*- coding: utf-8 -*-

export PLUGIN_TEMPLATE_PACKAGE_NAME=plugin-template
export PLUGIN_TEMPLATE_MESSAGE_BREW="Please install brew or use antibody bundle hadenlabs/zsh-brew branch:develop"
export PLUGIN_TEMPLATE_MESSAGE_PYENV="Please install brew or use antibody bundle hadenlabs/zsh-pyenv branch:develop"
export PLUGIN_TEMPLATE_MESSAGE_NOT_FOUND="this not found installed"
export ZSH_DENO_PACKAGE_NAME=deno
export ZSH_DENO_MESSAGE_BREW="Please install brew or use antibody bundle hadenlabs/zsh-brew"
export ZSH_DENO_MESSAGE_PYENV="Please install brew or use antibody bundle hadenlabs/zsh-pyenv"
export ZSH_DENO_MESSAGE_NOT_FOUND="this not found installed"
10 changes: 5 additions & 5 deletions config/main.zsh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env ksh
# -*- coding: utf-8 -*-

function plugin-template::config::main::factory {
function deno::config::main::factory {
# shellcheck source=/dev/null
source "${ZSH_PLUGIN_TEMPLATE_PATH}"/config/base.zsh
source "${ZSH_DENO_PATH}"/config/base.zsh
case "${OSTYPE}" in
darwin*)
# shellcheck source=/dev/null
source "${ZSH_PLUGIN_TEMPLATE_PATH}"/config/osx.zsh
source "${ZSH_DENO_PATH}"/config/osx.zsh
;;
linux*)
# shellcheck source=/dev/null
source "${ZSH_PLUGIN_TEMPLATE_PATH}"/config/linux.zsh
source "${ZSH_DENO_PATH}"/config/linux.zsh
;;
esac
}

plugin-template::config::main::factory
deno::config::main::factory
10 changes: 5 additions & 5 deletions core/main.zsh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/usr/bin/env ksh
# -*- coding: utf-8 -*-

function plugin-template::core::main::factory {
function deno::core::main::factory {
# shellcheck source=/dev/null
source "${ZSH_PLUGIN_TEMPLATE_PATH}"/core/base.zsh
source "${ZSH_DENO_PATH}"/core/base.zsh
case "${OSTYPE}" in
darwin*)
# shellcheck source=/dev/null
source "${ZSH_PLUGIN_TEMPLATE_PATH}"/core/osx.zsh
source "${ZSH_DENO_PATH}"/core/osx.zsh
;;
linux*)
# shellcheck source=/dev/null
source "${ZSH_PLUGIN_TEMPLATE_PATH}"/core/linux.zsh
source "${ZSH_DENO_PATH}"/core/linux.zsh
;;
esac
}

plugin-template::core::main::factory
deno::core::main::factory
6 changes: 3 additions & 3 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Commands ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Commands ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: Commands -->
<!-- Include: disclaimer.md -->
Expand Down
6 changes: 3 additions & 3 deletions docs/components.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Components ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Components ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: Components -->
<!-- Include: disclaimer.md -->
Expand Down
18 changes: 9 additions & 9 deletions docs/contribute/github-flow.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Contributing GithubFlow ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Contributing GithubFlow ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: Contributing -->
<!-- Label: GithubFlow -->
<!-- Include: ./../disclaimer.md -->
<!-- Include: ac:toc -->

To contribute to zsh-plugin-template project on [GitHub](https://github.com/hadenlabs/zsh-plugin-template), We use [GitHub Flow](https://githubflow.github.io/), it means that you should branch from the main repository and contribute back by making [pull request](https://github.com/hadenlabs/zsh-plugin-template/pulls).
To contribute to zsh-deno project on [GitHub](https://github.com/hadenlabs/zsh-deno), We use [GitHub Flow](https://githubflow.github.io/), it means that you should branch from the main repository and contribute back by making [pull request](https://github.com/hadenlabs/zsh-deno/pulls).

GitHub Flow is very lightweight (especially compared to GitFlow). This workflow uses only two kinds of branches:

Expand All @@ -23,18 +23,18 @@ For more information see [GitHub Flow](https://githubflow.github.io/)

## Getting started

To follow the instructions in this guide and start contributing to zsh-plugin-template project on GitHub:
To follow the instructions in this guide and start contributing to zsh-deno project on GitHub:

1. **Fork** the repo on GitHub
2. **Clone** the project to your own machine

To synchronize with the main repository, add it to the remotes:

```bash
git remote add upstream https://github.com/hadenlabs/zsh-plugin-template.git
git remote add upstream https://github.com/hadenlabs/zsh-deno.git
```

Now your **upstream** points to **hadenlabs/zsh-plugin-template**.
Now your **upstream** points to **hadenlabs/zsh-deno**.

## Branches

Expand All @@ -58,7 +58,7 @@ To resolve a conflict, run the following commands.

```bash
# checkout a branch you open PR from
git fetch upstream # assuming upstream is hadenlabs/zsh-plugin-template
git fetch upstream # assuming upstream is hadenlabs/zsh-deno
git merge upstream/merge_branch # Where merge_branch is a branch you open merge request against.
# resolve merge requests
git add changed_files
Expand All @@ -70,7 +70,7 @@ Github will automatically update your pull request.

### Testing

All merge requests are automatically tested using [Github Actions](https://github.com/hadenlabs/zsh-plugin-template/actions). In case some tests fail, fix the issues or describe why the fix cannot be done.
All merge requests are automatically tested using [Github Actions](https://github.com/hadenlabs/zsh-deno/actions). In case some tests fail, fix the issues or describe why the fix cannot be done.

### Review

Expand Down
18 changes: 9 additions & 9 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Contributing ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Contributing ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Contributing -->
<!-- Include: disclaimer.md -->
<!-- Include: ac:toc -->

# How To Contribute

Contributions to zsh-plugin-template are welcome.
Contributions to zsh-deno are welcome.

Feel free to use all of the contribution options:

- Contribute to zsh-plugin-template repositories on [GitHub](https://github.com/hadenlabs/zsh-plugin-template). See [Git flow](./contribute/github-flow.md).
- Contribute to zsh-deno repositories on [GitHub](https://github.com/hadenlabs/zsh-deno). See [Git flow](./contribute/github-flow.md).

## Getting Started

Expand Down Expand Up @@ -73,23 +73,23 @@ See [Git flow](./contribute/github-flow.md).

### Documentation

Documentation is a part of the zsh-plugin-template code base. You can find the documentation files in the `doc/` subdirectory of the [main repository](https://github.com/hadenlabs/zsh-plugin-template). This means that the contribution process is the same for both the source code and documentation.
Documentation is a part of the zsh-deno code base. You can find the documentation files in the `doc/` subdirectory of the [main repository](https://github.com/hadenlabs/zsh-deno). This means that the contribution process is the same for both the source code and documentation.

### Testing

See [Testing](./testing.md).

### Code Submission

1. See if a [Pull Request](https://github.com/hadenlabs/zsh-plugin-template/pulls) exists
1. See if a [Pull Request](https://github.com/hadenlabs/zsh-deno/pulls) exists
- Add some comments or review the code to help it along
- Don\'t be afraid to comment when logic needs clarification
2. Create a Fork and open a [Pull Request](https://github.com/hadenlabs/zsh-plugin-template/pulls) if needed
2. Create a Fork and open a [Pull Request](https://github.com/hadenlabs/zsh-deno/pulls) if needed

### Code Review

- Anyone can review code
- Any [Pull Request](https://github.com/hadenlabs/zsh-plugin-template/pulls) should be closed or merged within a week
- Any [Pull Request](https://github.com/hadenlabs/zsh-deno/pulls) should be closed or merged within a week

### Code Acceptance

Expand Down
6 changes: 3 additions & 3 deletions docs/env-vars.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: EnvVars ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: EnvVars ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: EnvVars -->
<!-- Include: disclaimer.md -->
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/common.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Examples ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Examples ZshDeno -->
<!-- Label: Examples -->
<!-- Include: ./../disclaimer.md -->
<!-- Include: ac:toc -->
Expand Down
4 changes: 2 additions & 2 deletions docs/functions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Functions ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Functions ZshDeno -->
<!-- Label: Functions -->
<!-- Include: docs/disclaimer.md -->
<!-- Include: ac:toc -->
Expand Down
10 changes: 5 additions & 5 deletions docs/include/installation/antibody.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Installation Antibody ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Installation Antibody ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: Installation -->
<!-- Include: docs/disclaimer.md -->
Expand All @@ -14,10 +14,10 @@ If you're using [Antibody](https://github.com/getantibody/antibody), install thi
1. Add :

```{.sourceCode .bash}
antibody bundle hadenlabs/zsh-plugin-template
antibody bundle hadenlabs/zsh-deno
```

to your `.zshrc` where you're adding your other plugins.

2. Either open a new terminal to force zsh to load the new plugin, or run `antibody bundle hadenlabs/zsh-plugin-template` in a running zsh session.
2. Either open a new terminal to force zsh to load the new plugin, or run `antibody bundle hadenlabs/zsh-deno` in a running zsh session.
3. Enjoy!
10 changes: 5 additions & 5 deletions docs/include/installation/antigen.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Installation Antigen ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Installation Antigen ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: Installation -->
<!-- Label: Antigen -->
Expand All @@ -12,6 +12,6 @@

If you're using [Antigen](https://github.com/zsh-users/antigen), install this plugin by doing the following:

1. Add `antigen bundle hadenlabs/zsh-plugin-template` to your `.zshrc` where you're adding your other plugins.
2. Either open a new terminal to force zsh to load the new plugin, or run `antigen bundle hadenlabs/zsh-plugin-template` in a running zsh session.
1. Add `antigen bundle hadenlabs/zsh-deno` to your `.zshrc` where you're adding your other plugins.
2. Either open a new terminal to force zsh to load the new plugin, or run `antigen bundle hadenlabs/zsh-deno` in a running zsh session.
3. Enjoy!
10 changes: 5 additions & 5 deletions docs/include/installation/oh-my-zsh.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Space: Projects -->
<!-- Parent: ZshPluginTemplate -->
<!-- Title: Installation Oh-My-Zsh ZshPluginTemplate -->
<!-- Label: ZshPluginTemplate -->
<!-- Parent: ZshDeno -->
<!-- Title: Installation Oh-My-Zsh ZshDeno -->
<!-- Label: ZshDeno -->
<!-- Label: Project -->
<!-- Label: Installation -->
<!-- Label: Oh-My-Zsh -->
Expand All @@ -13,6 +13,6 @@
If you're using [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh), install this plugin by doing the following:

1. Go to your oh-my-zsh custom plugins directory -`cd ~/.oh-my-zsh/custom/plugins`
2. Clone the plugin `bash git clone https://github.com/hadenlabs/zsh-plugin-template`bash
3. Edit your `.zshrc` and add `plugins=( ... zsh-plugin-template )` to your list of plugins
2. Clone the plugin `bash git clone https://github.com/hadenlabs/zsh-deno`bash
3. Edit your `.zshrc` and add `plugins=( ... zsh-deno )` to your list of plugins
4. Open a new terminal and enjoy!
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Welcome to zsh-plugin-template documentation
# Welcome to zsh-deno documentation
Loading

0 comments on commit 2d088c7

Please sign in to comment.