Skip to content

Commit

Permalink
Added initial Pongo structure
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Jul 5, 2024
1 parent 5fab155 commit c7bf827
Show file tree
Hide file tree
Showing 47 changed files with 6,381 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
end_of_line = lf
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf

*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
*.ez binary
*.bz2 binary
*.swp binary
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [oskardudycz]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
54 changes: 54 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and test

on:
# run it on push to the default repository branch
push:
branches: [main]
paths:
- "src/**"
- "./.github/workflows/build_and_test.yml"

# run it during pull request
pull_request:
paths:
- "src/**"
- "./.github/workflows/build_and_test.yml"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

defaults:
run:
working-directory: src

jobs:
build-and-test-code:
name: Build application code
# use system defined below in the tests matrix
runs-on: ubuntu-latest

steps:
- name: Check Out Repo
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ./src/.nvmrc
cache: "npm"
cache-dependency-path: "./src/package-lock.json"

- name: Install dependencies
run: npm ci

- name: Build TS
run: npm run build:ts

- name: Run linting (ESlint and Prettier)
run: npm run lint

- name: Build
run: npm run build

- name: Test
run: npm run test
75 changes: 75 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

defaults:
run:
working-directory: src

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ./src/.nvmrc
cache: "npm"
cache-dependency-path: "./src/package-lock.json"

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install

- name: Build with VitePress
run: |
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
touch docs/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./src/docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish to NPM
on: [workflow_dispatch]

defaults:
run:
working-directory: src

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version-file: ./src/.nvmrc
cache: "npm"
cache-dependency-path: "./src/package-lock.json"

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
env:
NODE_ENV: production

- name: Set public publishing
run: npm config set access public

- name: Publish package on NPM 📦
run: npm publish --ws
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_ENV: production
29 changes: 13 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -39,6 +38,7 @@ bower_components
build/Release

# Dependency directories
*/node_modules/
node_modules/
jspm_packages/

Expand All @@ -54,9 +54,6 @@ web_modules/
# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -72,12 +69,9 @@ web_modules/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
# dotenv environment variables file
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand All @@ -100,13 +94,6 @@ dist
# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand All @@ -128,3 +115,13 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# vitepress
src/docs/.vitepress/dist
src/docs/.vitepress/cache
lib

.DS_Store
*/.output
e2e/esmCompatibility/.output
src/e2e/esmCompatibility/.output
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.1
1 change: 1 addition & 0 deletions .vscode/Node.js.code-profile

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug All Tests (Node)",
"type": "node",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test", "--inspect-brk=9229"], // Use --inspect-brk for debugging
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"cwd": "${workspaceFolder}/src/",
"sourceMaps": true
},
{
"name": "Debug Current Test File",
"type": "node",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"test:singlefile",
"--",
"${file}",
"--inspect-brk=9229"
], // Use --inspect-brk for debugging
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"cwd": "${workspaceFolder}/src/",
"sourceMaps": true
}
]
}
27 changes: 27 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,

"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit",
"source.addMissingImports": "always"
},

"editor.tabSize": 2,

"files.exclude": {
"node_modules/": true,
"**/node_modules/": true,
"**/dist/": true,
"**/*.tsbuildinfo": true
},
"files.eol": "\n",

"typescript.preferences.importModuleSpecifier": "relative",
"eslint.workingDirectories": [{ "mode": "auto" }],
"debug.javascript.terminalOptions": {
"nodeVersionHint": 20
}
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:ts:watch",
"group": "build",
"problemMatcher": [],
"label": "npm: build:ts:watch",
"detail": "tsc --watch",
"options": {
"cwd": "${workspaceFolder}/src/"
}
}
]
}
Loading

0 comments on commit c7bf827

Please sign in to comment.