@theholocron/react-template 0.1.0 → 0.2.1

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 CHANGED
@@ -1,6 +1,6 @@
1
- # react-template
1
+ # React Template
2
2
 
3
- <description> used within the Galaxy.
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
- <!-- fill out the usage with examples -->
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
- <!-- document the api(s), or how to use with examples -->
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,7 +3,22 @@
3
3
  "description": "<description>",
4
4
  "homepage": "https://github.com/theholocron/react-template#readme",
5
5
  "author": "Newton Koumantzelis",
6
- "version": "0.1.0",
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.1",
7
22
  "repository": {
8
23
  "type": "git",
9
24
  "url": "git+https://github.com/theholocron/react-template.git"
@@ -13,36 +28,56 @@
13
28
  "wiki": "https://github.com/theholocron/react-template/wiki",
14
29
  "license": "GPL-3.0",
15
30
  "packageManager": "npm@9.5.0",
16
- "commitlint": {
17
- "extends": "@theholocron"
18
- },
19
- "eslintConfig": {
20
- "extends": "@theholocron"
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
- "jest": {
23
- "displayName": "react-template",
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
- "build": "tsc --noEmit",
32
- "lint": "eslint --ignore-path .gitignore '**/*.{js,jsx,ts,tsx}'",
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": "jest"
56
+ "start": "storybook dev -p 6006",
57
+ "test": "vitest",
58
+ "test:cypress": "cypress open",
59
+ "test:storybook": "test-storybook --coverage"
36
60
  },
37
61
  "devDependencies": {
38
62
  "@changesets/changelog-github": "^0.5.0",
39
63
  "@changesets/cli": "^2.27.9",
40
- "@theholocron/bundlewatch-config": "^3.1.0",
41
- "@theholocron/commitlint-config": "^3.1.0",
42
- "@theholocron/eslint-config": "^3.1.0",
43
- "@theholocron/jest-config": "^3.1.0",
44
- "@theholocron/lint-staged-config": "^3.1.0",
45
- "@theholocron/prettier-config": "^3.1.0",
46
- "@theholocron/tsconfig": "^3.1.0"
64
+ "@theholocron/commitlint-config": "^3.4.4",
65
+ "@theholocron/eslint-config": "^3.4.4",
66
+ "@theholocron/jest-config": "^3.4.4",
67
+ "@theholocron/lint-staged-config": "^3.4.4",
68
+ "@theholocron/prettier-config": "^3.4.4",
69
+ "@theholocron/storybook-config": "^3.4.4",
70
+ "@theholocron/stylelint-config": "^3.4.4",
71
+ "@theholocron/tsconfig": "^3.4.4",
72
+ "@tsconfig/vite-react": "^3.0.2",
73
+ "@vitejs/plugin-react": "^4.3.2",
74
+ "alexjs": "^1.0.0",
75
+ "react": "^18.3.1",
76
+ "react-dom": "^18.3.1",
77
+ "vite": "^5.4.9"
78
+ },
79
+ "peerDependencies": {
80
+ "react": "^18.3.1",
81
+ "react-dom": "^18.3.1"
47
82
  }
48
83
  }
package/.alexignore DELETED
@@ -1,3 +0,0 @@
1
- .github/*
2
- CHANGELOG.md
3
- LICENSE
@@ -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)
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
3
- "access": "public",
4
- "baseBranch": "main",
5
- "changelog": ["@changesets/changelog-github", {"repo": "theholocron/configs"}],
6
- "commit": false,
7
- "updateInternalDependencies": "patch"
8
- }
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
@@ -1,12 +0,0 @@
1
- # Enforce Unix newlines
2
- *.css text eol=lf
3
- *.html text eol=lf
4
- *.js text eol=lf
5
- *.json text eol=lf
6
- *.scss text eol=lf
7
- *.md text eol=lf
8
- *.svg text eol=lf
9
- *.yml text eol=lf
10
-
11
- # Don't diff or textually merge source maps
12
- *.map binary
@@ -1 +0,0 @@
1
- * @theholocron/gatekeepers
@@ -1,6 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "npm"
4
- directory: "/"
5
- schedule:
6
- interval: "weekly"
@@ -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
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@theholcron/tsconfig/node-next/tsconfig.json"
3
- }