Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored Nov 7, 2022
0 parents commit 2522382
Show file tree
Hide file tree
Showing 78 changed files with 60,530 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# we only want es2015 compliant browsers https://caniuse.com/#feat=es6
# just use one as representative for all

supports es6-module
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: [
'@tinkoff/eslint-config-angular',
'@tinkoff/eslint-config-angular/html',
'@tinkoff/eslint-config-angular/rxjs',
],
ignorePatterns: ['projects/**/test.ts', '*.json', '*.less', '*.md', '*.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: [require.resolve('./tsconfig.eslint.json')],
},
};
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: 🐞 Bug report
about: Create a report to help us improve
title: '[BUG] '
labels: ''
---

# 🐞 Bug report

### Description

<!-- A clear and concise description of what the bug is -->

### Reproduction

<!-- Steps to reproduce or, preferably, a demo on StackBlitz or similar service -->

http://www.stackblitz.com/...

### Expected behavior

<!-- A clear and concise description of what you expected to happen -->

### Versions

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Angular [e.g. 8]

### Additional context

<!-- Add any other context about the problem here -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: 🚀 Feature request
about: Suggest an idea for this project
title: '[FEATURE]'
labels: ''
---

# 🚀 Feature request

### Is your feature request related to a problem?

<!-- A clear and concise description of what the problem is. Ex. -->
<!-- ✍️edit: --> I'm always frustrated when...

### Describe the solution you'd like

<!-- A clear and concise description of what you want to happen -->
<!-- ✍️edit: -->

### Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered -->
<!-- ✍️edit: -->

### Additional context

<!-- Add any other context or screenshots about the feature request here -->
<!-- ✍️edit: -->
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] The commit message follows [Conventional Commits](https://www.conventionalcommits.org/en/)
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring
- [ ] Code style update
- [ ] Build or CI related changes
- [ ] Documentation content changes

## What is the current behavior?

Closes # <!-- link to a relevant issue. -->

## What is the new behavior?

## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No
56 changes: 56 additions & 0 deletions .github/actions/nodejs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Action for Node.js
description: Node.js setup cache

inputs:
node-version:
description: Node.js version
required: false
default: 16.x

runs:
using: composite
steps:
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Restore node_modules from cache
id: cache-node-modules
uses: actions/cache@v3
with:
path: |
**/node_modules
!**/node_modules/.cache
key: modules-cache__nodejs-${{ inputs.node-version }}__${{ hashfiles('**/package-lock.json') }}

- name: Restore from cache of builds
id: build-cache
if: steps.cache-node-modules.outputs.cache-hit == 'true'
uses: actions/cache@v3
with:
path: |
**/node_modules/.cache
key: builds-cache-hash__${{ hashFiles('**/package-lock.json') }}-${{ github.ref }}
restore-keys: builds-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}

- name: Restore from global NPM cache
if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-cache-hash__

- run: npm ci
env:
CYPRESS_CACHE_FOLDER: ./node_modules/cache-cypress
if: steps.cache-node-modules.outputs.cache-hit != 'true'
shell: bash

- name: environment
shell: bash
run: |
node -v
npm -v
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build
on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Build demo
run: npm run build

concurrency:
group: build-${{ github.head_ref }}
cancel-in-progress: true
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Build demo
run: npm run build

- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist/demo/browser
silent: false
clean: true

concurrency:
group: deploy-${{ github.head_ref }}
cancel-in-progress: true
43 changes: 43 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: E2E
on: [pull_request]

jobs:
e2e:
runs-on: ubuntu-latest
env:
CYPRESS_CACHE_FOLDER: ./node_modules/cache-cypress
UNIVERSAL_SERVER: http://localhost:4000
STATIC_SERVER: http://localhost:8080
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Build demo
run: npm run build

- name: Prerender demo
run: npm run build:prerender

- name: Serving static files
run: |
npm run serve:prerender & sleep 5
curl -X GET -I -f "${{ env.STATIC_SERVER }}"
- name: Run cypress / ssr / prerender
run: npm run cy:run -- --spec "**/ssr/*.cy.ts" --config baseUrl="${{ env.STATIC_SERVER }}"

- name: Build ssr server
run: npm run build:ssr

- name: Serving ssr server
run: |
npm run serve:ssr & sleep 5
curl -X GET -I -f "${{ env.UNIVERSAL_SERVER }}"
- name: Run cypress / ssr / universal
run: npm run cy:run -- --spec "**/ssr/*.cy.ts" --config baseUrl="${{ env.UNIVERSAL_SERVER }}"

concurrency:
group: integration-e2e-${{ github.head_ref }}
cancel-in-progress: true
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint
on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Lint check
run: |
npm run typecheck
npm run format -- --check
npm run stylelint
npm run lint
concurrency:
group: lint-${{ github.head_ref }}
cancel-in-progress: true
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests
on:
pull_request:
push:
branches:
- main

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js and Cache
uses: ./.github/actions/nodejs

- name: Run tests
run: npm run test -- --coverage

- uses: codecov/codecov-action@v2
with:
directory: ./coverage
flags: summary
name: demo

concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

# cypress
**/cypress/**/screenshots/**
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
# shellcheck disable=SC1090
. "$(dirname "$0")/_/husky.sh"

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

npx lint-staged
npm run typecheck
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
legacy-peer-deps=true
engine-strict=false
lockfileVersion=2
ignore-engines=true
loglevel=error
Loading

0 comments on commit 2522382

Please sign in to comment.