Skip to content

Commit

Permalink
add base structure and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pokornyd committed Oct 3, 2024
1 parent f276f6a commit 7dedb7e
Show file tree
Hide file tree
Showing 23 changed files with 22,863 additions and 1,393 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": [
"@kontent-ai"
],

"overrides": [
{
"files": ["src/**/*.ts"],
"excludedFiles": ["src/log.ts", "vite.config.ts"]
}
],

"parserOptions": {
"project": ["tsconfig.app.json"]
}
}
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @pokornyd @kontent-ai/developer-relations
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve

---

### Brief bug description

What went wrong?

### Repro steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Expected behavior

What is the correct behavior?

### Test environment

- Platform/OS: [e.g. .NET Core 2.1, iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

### Additional context

Add any other context about the problem here.

### Screenshots

Add links to screenshots, if possible.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

### Motivation

Why is this feature required? What problems does it solve?

### Proposed solution

An ideal solution for the above problems.

### Additional context

Add any other context, screenshots, or reference links about the feature request here.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Question
about: Ask a question

---

### Question

What do you want to ask?

### Reference

* URL
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/spike.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Spike
about: Suggest an analysis of a problem

---

### Expected result

What do we want to explore and why? Which questions do we want to answer with this spike?

### Additional context

Add any other context or guidelines here.

### Resources

* URL
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Motivation

Which issue does this fix? Fixes #`issue number`

If no issue exists, what is the fix or new feature? Were there any reasons to fix/implement things that are not obvious?

### Checklist

- [ ] Code follows coding conventions held in this repo
- [ ] Automated tests have been added
- [ ] Tests are passing
- [ ] Docs have been updated (if applicable)
- [ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

### How to test

If manual testing is required, what are the steps?
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint & Build

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js from .nvmrc file
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run fmt:check
- run: npm run lint
- run: npm run build
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
release:
types: [published]

name: publish-to-npm
jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm run build

- run: npm publish --access=public
if: ${{!github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
- run: npm publish --tag prerelease
if: ${{github.event.release.prerelease}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
14 changes: 14 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "https://raw.githubusercontent.com/kontent-ai/dprint-config/main/dprint.json",
"plugins": [
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.11.0.wasm"
],
"includes": [
"src/**/*.{ts,tsx,js,jsx,json,html}",
"tests/**/*.{ts,tsx,js,jsx,json,html}"
],
"excludes": [
"tests/**/*.snap.html"
]
}

28 changes: 0 additions & 28 deletions eslint.config.js

This file was deleted.

9 changes: 9 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build]
command = "npm run build"
publish = "dist"
functions = "src/functions"

[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Loading

0 comments on commit 7dedb7e

Please sign in to comment.