@theholocron/react-template 0.1.0 → 0.2.2
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/README.md +16 -4
- package/package.json +61 -22
- package/.alexignore +0 -3
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -8
- package/.editorconfig +0 -24
- package/.gitattributes +0 -12
- package/.github/CODEOWNERS +0 -1
- package/.github/dependabot.yml +0 -6
- package/.github/labeler.yml +0 -15
- package/.github/workflows/audit.yml +0 -28
- package/.github/workflows/greetings.yml +0 -29
- package/.github/workflows/label.yml +0 -15
- package/.github/workflows/release.yml +0 -38
- package/.github/workflows/stale.yml +0 -24
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.husky/prepare-commit-msg +0 -18
- package/tsconfig.json +0 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React Template
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React template used within the Galaxy.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,8 +10,20 @@ npm install --save-dev @theholocron/react-template
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
```typescript
|
|
14
|
+
import { Component, type ComponentProps } from "@theholocron/react-template";
|
|
15
|
+
|
|
16
|
+
function App (props: ComponentProps) {
|
|
17
|
+
return (
|
|
18
|
+
<Component {...props} />
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
14
22
|
|
|
15
23
|
## Documentation
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
The best way to find out what's available is to check out the [documentation site](https://docs.theholocron.dev/react-template/), but if you like digging through source code, then each component is typed via TypeScript.
|
|
26
|
+
|
|
27
|
+
**Note**
|
|
28
|
+
|
|
29
|
+
We use [SuperLinter](https://github.com/super-linter) for all linting checks on `push` and `pull_request` events. One of those tools is [Gitleaks](https://github.com/gitleaks/gitleaks), which protects and discovers secrets that happen to sneak into code commits. There are other ways to install Gitleaks, but you **ARE** required to install it locally as it runs on a `pre-commit` Git hook. To install, run `brew install gitleaks` or check their documentation for other options.
|
package/package.json
CHANGED
|
@@ -3,46 +3,85 @@
|
|
|
3
3
|
"description": "<description>",
|
|
4
4
|
"homepage": "https://github.com/theholocron/react-template#readme",
|
|
5
5
|
"author": "Newton Koumantzelis",
|
|
6
|
-
"
|
|
6
|
+
"main": "dist/react-template.cjs.js",
|
|
7
|
+
"module": "dist/react-template.es.js",
|
|
8
|
+
"style": "dist/style.css",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/react-template.es.js",
|
|
13
|
+
"require": "./dist/react-template.cjs.js"
|
|
14
|
+
},
|
|
15
|
+
"./style": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/*"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"version": "0.2.2",
|
|
7
22
|
"repository": {
|
|
8
23
|
"type": "git",
|
|
9
|
-
"url": "
|
|
24
|
+
"url": "https://github.com/theholocron/react-template.git"
|
|
10
25
|
},
|
|
11
26
|
"bugs": "https://github.com/theholocron/react-template/issues",
|
|
12
27
|
"releases": "https://github.com/theholocron/react-template/releases",
|
|
13
28
|
"wiki": "https://github.com/theholocron/react-template/wiki",
|
|
14
29
|
"license": "GPL-3.0",
|
|
15
30
|
"packageManager": "npm@9.5.0",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
"bundlewatch": {
|
|
32
|
+
"files": [
|
|
33
|
+
{
|
|
34
|
+
"path": "./dist/**/*.css",
|
|
35
|
+
"maxSize": "50 kB"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "./dist/**/*.js",
|
|
39
|
+
"maxSize": "100 kB"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
21
42
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"preset": "@theholocron/jest-config"
|
|
43
|
+
"msw": {
|
|
44
|
+
"workerDirectory": "public"
|
|
25
45
|
},
|
|
26
46
|
"publishConfig": {
|
|
27
47
|
"access": "public"
|
|
28
48
|
},
|
|
29
|
-
"prettier": "@theholocron/prettier-config",
|
|
30
49
|
"scripts": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
50
|
+
"dev": "vite",
|
|
51
|
+
"build": "vite build",
|
|
52
|
+
"build:storybook": "storybook build",
|
|
53
|
+
"lint": "docker run -e LOG_LEVEL=DEBUG -e RUN_LOCAL=true -v .:/tmp/lint --rm ghcr.io/super-linter/super-linter:latest",
|
|
54
|
+
"preview": "vite preview",
|
|
33
55
|
"release": "changeset",
|
|
34
|
-
"start": "",
|
|
35
|
-
"test": "
|
|
56
|
+
"start": "storybook dev -p 6006",
|
|
57
|
+
"test": "vitest",
|
|
58
|
+
"test:cypress": "cypress open",
|
|
59
|
+
"test:storybook": "test-storybook --coverage"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": ">=23",
|
|
63
|
+
"npm": ">=10"
|
|
36
64
|
},
|
|
37
65
|
"devDependencies": {
|
|
38
66
|
"@changesets/changelog-github": "^0.5.0",
|
|
39
67
|
"@changesets/cli": "^2.27.9",
|
|
40
|
-
"@theholocron/
|
|
41
|
-
"@theholocron/
|
|
42
|
-
"@theholocron/
|
|
43
|
-
"@theholocron/
|
|
44
|
-
"@theholocron/
|
|
45
|
-
"@theholocron/
|
|
46
|
-
"@theholocron/
|
|
68
|
+
"@theholocron/commitlint-config": "^3.4.4",
|
|
69
|
+
"@theholocron/eslint-config": "^3.4.4",
|
|
70
|
+
"@theholocron/jest-config": "^3.4.4",
|
|
71
|
+
"@theholocron/lint-staged-config": "^3.4.4",
|
|
72
|
+
"@theholocron/prettier-config": "^3.4.4",
|
|
73
|
+
"@theholocron/storybook-config": "^3.4.4",
|
|
74
|
+
"@theholocron/stylelint-config": "^3.4.4",
|
|
75
|
+
"@theholocron/tsconfig": "^3.4.4",
|
|
76
|
+
"@tsconfig/vite-react": "^3.0.2",
|
|
77
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
78
|
+
"alexjs": "^1.0.0",
|
|
79
|
+
"react": "^18.3.1",
|
|
80
|
+
"react-dom": "^18.3.1",
|
|
81
|
+
"vite": "^5.4.9"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"react": "^18.3.1",
|
|
85
|
+
"react-dom": "^18.3.1"
|
|
47
86
|
}
|
|
48
87
|
}
|
package/.alexignore
DELETED
package/.changeset/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Changesets
|
|
2
|
-
|
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
-
|
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/.changeset/config.json
DELETED
package/.editorconfig
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
end_of_line = lf
|
|
5
|
-
charset = utf-8
|
|
6
|
-
trim_trailing_whitespace = true
|
|
7
|
-
insert_final_newline = true
|
|
8
|
-
indent_style = tab
|
|
9
|
-
indent_size = 4
|
|
10
|
-
|
|
11
|
-
[.gitattributes]
|
|
12
|
-
indent_style = space
|
|
13
|
-
indent_size = 2
|
|
14
|
-
|
|
15
|
-
[*.{json,yml}]
|
|
16
|
-
indent_style = space
|
|
17
|
-
indent_size = 2
|
|
18
|
-
|
|
19
|
-
[*.md]
|
|
20
|
-
trim_trailing_whitespace = false
|
|
21
|
-
|
|
22
|
-
[.*{rc,ignore}]
|
|
23
|
-
indent_style = space
|
|
24
|
-
indent_size = 2
|
package/.gitattributes
DELETED
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @theholocron/gatekeepers
|
package/.github/dependabot.yml
DELETED
package/.github/labeler.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Add 'docs' label to any changes within 'docs' folder or any subfolders
|
|
2
|
-
# Add 'docs' label to any change to .md files within the entire repository
|
|
3
|
-
documentation:
|
|
4
|
-
- changed-files:
|
|
5
|
-
- any-glob-to-any-file:
|
|
6
|
-
- docs/**
|
|
7
|
-
- '**/*.md'
|
|
8
|
-
|
|
9
|
-
# Add 'bug' label to any PR where the head branch name starts with `fix` or has a `fix` section in the name
|
|
10
|
-
bug:
|
|
11
|
-
- head-branch: ['^fix', 'fix']
|
|
12
|
-
|
|
13
|
-
# Add 'enhancement' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
|
|
14
|
-
enhancement:
|
|
15
|
-
- head-branch: ['^feat', 'feature']
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: "Audit"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
types: [synchronize, opened]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
bundlewatch:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- name: Checkout
|
|
12
|
-
uses: actions/checkout@v4
|
|
13
|
-
|
|
14
|
-
- name: Set up Node.js
|
|
15
|
-
uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20
|
|
18
|
-
cache: "npm"
|
|
19
|
-
|
|
20
|
-
- name: Install dependencies
|
|
21
|
-
- run: npm ci
|
|
22
|
-
|
|
23
|
-
- name: Bundlewatch
|
|
24
|
-
- uses: jackyef/bundlewatch-gh-action@0.3.0
|
|
25
|
-
with:
|
|
26
|
-
build-script: npm run build
|
|
27
|
-
bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
28
|
-
bundlewatch-config: ./node_modules/@theholocron/bundlewatch-config/bundlewatch.config.js
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: Greetings
|
|
2
|
-
|
|
3
|
-
on: [pull_request, issues]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
greeting:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/first-interaction@v1
|
|
10
|
-
with:
|
|
11
|
-
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
12
|
-
issue-message: >
|
|
13
|
-
Hey @${{ github.event.issue.user.login }}!
|
|
14
|
-
We really appreciate you taking the time to report an issue. The
|
|
15
|
-
collaborators on this project attempt to help as many people as
|
|
16
|
-
possible, but we are a limited number of volunteers, so it is
|
|
17
|
-
possible that this will not be addressed as swiftly.
|
|
18
|
-
|
|
19
|
-
Your patience is much appreciated and we will get back to you as
|
|
20
|
-
quickly as possible.
|
|
21
|
-
pr-message: >
|
|
22
|
-
Hey @${{ github.event.issue.user.login }}!
|
|
23
|
-
We really appreciate you taking the time to help out with this PR.
|
|
24
|
-
The collaborators on this project attempt to help as many people as
|
|
25
|
-
possible, but we are a limited number of volunteers, so it is
|
|
26
|
-
possible that this will not be addressed as swiftly.
|
|
27
|
-
|
|
28
|
-
Your patience is much appreciated and we will get back to you as
|
|
29
|
-
quickly as possible.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: Labeler
|
|
2
|
-
|
|
3
|
-
on: [pull_request_target]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
label:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
pull-requests: write
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/labeler@v4
|
|
13
|
-
with:
|
|
14
|
-
sync-labels: true
|
|
15
|
-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
name: "Version, Release, & Publish"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
|
|
7
|
-
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
release:
|
|
11
|
-
permissions:
|
|
12
|
-
contents: write # to create release
|
|
13
|
-
issues: write # to post issue comments
|
|
14
|
-
pull-requests: write # to create pull request
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@v4
|
|
19
|
-
|
|
20
|
-
- name: Set up Node.js
|
|
21
|
-
uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: 20.x
|
|
24
|
-
cache: "npm"
|
|
25
|
-
|
|
26
|
-
- name: Install dependencies
|
|
27
|
-
run: npm ci
|
|
28
|
-
|
|
29
|
-
- name: Publish to NPM
|
|
30
|
-
uses: changesets/action@v1
|
|
31
|
-
with:
|
|
32
|
-
title: "chore(release): 🦋 version packages"
|
|
33
|
-
commit: "chore(release): 🦋 version packages"
|
|
34
|
-
version: npx changeset version
|
|
35
|
-
publish: npx changeset publish
|
|
36
|
-
env:
|
|
37
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: Mark stale issues and pull requests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
schedule:
|
|
5
|
-
- cron: "30 1 * * *"
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
stale:
|
|
9
|
-
permissions:
|
|
10
|
-
contents: write # only for delete-branch option
|
|
11
|
-
issues: write
|
|
12
|
-
pull-requests: write
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/stale@v9
|
|
16
|
-
with:
|
|
17
|
-
days-before-close: 5
|
|
18
|
-
days-before-stale: 30
|
|
19
|
-
exempt-all-pr-milestones: true
|
|
20
|
-
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
|
|
21
|
-
stale-issue-label: 'wontfix'
|
|
22
|
-
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
|
23
|
-
stale-pr-label: 'wontfix'
|
|
24
|
-
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
package/.husky/commit-msg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx --no -- commitlint --edit $1
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx lint-staged --config @theholocron/lint-staged-config
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
NAME=$(git config user.name)
|
|
4
|
-
EMAIL=$(git config user.email)
|
|
5
|
-
|
|
6
|
-
if [ -z "$NAME" ]; then
|
|
7
|
-
echo "empty git config user.name"
|
|
8
|
-
exit 1
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
if [ -z "$EMAIL" ]; then
|
|
12
|
-
echo "empty git config user.email"
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
git interpret-trailers --if-exists doNothing --trailer \
|
|
17
|
-
"Signed-off-by: $NAME <$EMAIL>" \
|
|
18
|
-
--in-place "$1"
|
package/tsconfig.json
DELETED