Skip to content

Commit

Permalink
feat: initialize project
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Jul 14, 2023
0 parents commit 3d712df
Show file tree
Hide file tree
Showing 49 changed files with 13,267 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[COMMIT_EDITMSG]
max_line_length = 0
12 changes: 12 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "@ivangabriele/eslint-config-typescript-base",
"ignorePatterns": ["build/*"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"no-console": ["warning", { "allow": ["error", "info", "warn"] }],

"import/no-extraneous-dependencies": "off"
}
}
3 changes: 3 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["github>ivangabriele/renovate-config"]
}
55 changes: 55 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check

on: push

jobs:
lint:
name: Lint
if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 16
- name: Install
run: yarn
- name: Lint code
run: yarn test:lint

type:
name: Type
if: ${{ !startsWith(github.ref, 'refs/heads/ci-release-v') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 16
- name: Install
run: yarn
- name: Type
run: yarn test:type

# test:
# name: Test
# if: ${{ !startsWith(github.head_ref, 'ci-release-v') }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Setup Node.js
# uses: actions/setup-node@v3
# with:
# cache: yarn
# node-version: 20
# - name: Install
# run: yarn
# - name: Test
# run: yarn test:unit
19 changes: 19 additions & 0 deletions .github/workflows/merge_release_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Merge Release Pull Request

on:
pull_request:
types: [edited, opened, synchronize]

jobs:
merge:
name: Merge Release Pull Request
if: ${{ startsWith(github.head_ref, 'ci-release-v') }}
runs-on: ubuntu-latest
steps:
- name: Merge pull request
uses: pascalgn/automerge-action@v0.15.6
# https://github.com/pascalgn/automerge-action#configuration
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
MERGE_LABELS: ''
MERGE_METHOD: rebase
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on: workflow_dispatch

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup
uses: actions/setup-node@v3
with:
cache: yarn
node-version: 20
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Get version
id: get_version
run: echo ::set-output name=version::$(npm pkg get version | sed 's/"//g')
- name: Create pull request
uses: peter-evans/create-pull-request@v4
with:
branch: ci-release-v${{ steps.get_version.outputs.version }}
# https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs
commit-message: 'ci(release): ${{ steps.get_version.outputs.version }}'
title: 'ci(release): ${{ steps.get_version.outputs.version }}'
token: ${{ secrets.GH_PAT }}
177 changes: 177 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
################################################################################
# Node.js

# Logs
logs
*.log
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

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

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

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
# .yarn/cache
# .yarn/unplugged
# .yarn/build-state.yml
# .yarn/install-state.gz
# .pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

################################################################################
# Visual Studio Code

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

################################################################################
# Yarn (without Zero-Installs)

# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

################################################################################
# Custom
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"ivangabriele.vscode-git-add-and-commit"
]
}
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/build/**/*.js"],
"preLaunchTask": "${defaultBuildTask}",
"request": "launch",
"runtimeExecutable": "${execPath}",
"sourceMaps": true,
"type": "extensionHost"
},
{
"name": "Extension Tests",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/build/test/suite/index"
],
"outFiles": ["${workspaceFolder}/build/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}",
"request": "launch",
"type": "extensionHost"
}
]
}
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"group": {
"kind": "build",
"isDefault": true
},
"isBackground": true,
"presentation": {
"reveal": "never"
},
"problemMatcher": "$tsc-watch"
}
]
}
Loading

0 comments on commit 3d712df

Please sign in to comment.