Skip to content

Commit

Permalink
chore(init): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Celtian committed Apr 16, 2023
0 parents commit bed3b23
Show file tree
Hide file tree
Showing 71 changed files with 12,006 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [2, "always", ["ci", "chore", "docs", "feat", "fix", "perf", "refactor", "revert", "style"]]
}
}
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Editor configuration, see https://editorconfig.org
root = true

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

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": ["plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates"],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text eol=lf

yarn.lock -diff
package-lock.json -diff
3 changes: 3 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[user]
name = Dominik Hladík
email = [email protected]
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

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

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Describe your changes

_None_

## Issue ticket number and link

_None_

## Checklist before requesting a review

- [ ] I have performed a self-review of my code
- [ ] If it is a core feature, I have added thorough tests.
57 changes: 57 additions & 0 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test feature branch

on:
push:
branches:
- feat/*

jobs:
install-and-test:
name: Install & Test
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node version
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-${{ env.cache-name }}-
${{ runner.OS }}-yarn-
${{ runner.OS }}-
- name: Install dependencies
run: yarn

- name: Sync versions # Sync versions
run: yarn syncprojects

- name: Build demo app # Build Schematics and move
run: yarn build:demo --base-href https://celtian.github.io/ngx-translate-version/

- name: Build ngx-translate-version # Build
run: yarn build

- name: Run tests
run: yarn test --configuration=ci

- name: Upload coverage reports
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true
verbose: true
dry_run: true
102 changes: 102 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Build & Publish

on:
push:
tags:
- 'v*'

jobs:
install-and-build:
name: Install & Build
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node version
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-${{ env.cache-name }}-
${{ runner.OS }}-yarn-
${{ runner.OS }}-
- name: Install dependencies
run: yarn

- name: Sync versions # Sync versions
run: yarn syncprojects

- name: Build demo app # Build Schematics and move
run: yarn build:demo --base-href https://celtian.github.io/ngx-translate-version/

- name: Build ngx-translate-version # Build
run: yarn build

- name: Run tests
run: yarn test --code-coverage --configuration=ci

- name: Upload coverage reports
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
fail_ci_if_error: true
verbose: false
dry_run: false

- name: Publish NPM
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: cd dist/ngx-translate-version && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Publish NPM BETA
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == true
run: cd dist/ngx-translate-version && npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Publish to GitHub Package Registry
- name: Set up package for GPR
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: yarn gpr:setup

- name: Use GPR
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/
scope: '@celtian'

- name: Publish to GitHub Package Registry
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: |
cd dist/ngx-translate-version
npm publish
env:
NODE_AUTH_TOKEN: ${{github.token}}

- name: Copy index.html to 404.html
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: cp ./dist/demo/index.html ./dist/demo/404.html

- name: Deploy Github Pages
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./dist/demo
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
*.log

# Temporary files
version.ts
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package.json
package-lock.json
yarn.lock
dist
.angulardoc.json
.vscode/*
**/interfaces/*.ts
**/*.spec.ts
**/*.d.ts
**/*.html
**/functions/dist/*
**/angular.json
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 120,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"arrowParens": "always",
"bracketSpacing": true,
"trailingComma": "none"
}
Loading

0 comments on commit bed3b23

Please sign in to comment.