Skip to content

Commit 7788936

Browse files
committed
init: all files
0 parents  commit 7788936

File tree

227 files changed

+38854
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+38854
-0
lines changed

.firebase/hosting.ZGlzdFxGaW5hbFByb2plY3RcYnJvd3Nlcg.cache

+3,482
Large diffs are not rendered by default.

.firebaserc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "finalproject-a49e6"
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy to Firebase Hosting on merge
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
build_and_deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install dependencies
16+
run: npm ci
17+
18+
- name: Install Nx CLI
19+
run: npm install -g nx # Устанавливаем Nx глобально
20+
21+
- name: Build project
22+
run: nx build --skip-nx-cache
23+
24+
- name: Deploy to Firebase
25+
uses: FirebaseExtended/action-hosting-deploy@v0
26+
with:
27+
repoToken: ${{ secrets.GITHUB_TOKEN }}
28+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FINALPROJECT_A49E6 }}
29+
channelId: live
30+
projectId: finalproject-a49e6

.github/workflows/lint-test-merge.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
lint_and_test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4 # Клонируем репозиторий
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '20' # Укажите версию Node.js, которую вы используете
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Install Nx CLI
26+
run: npm install -g nx # Установка nx глобально
27+
28+
- name: Run linter
29+
run: npx eslint src
30+
31+
- name: Run tests
32+
run: nx test --skip-nx-cache

.gitignore

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
.nx/cache
42+
.nx/workspace-data
43+
44+
.angular
45+
46+
# Sentry Config File
47+
.sentryclirc

.gitlab-ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
image: node:20
2+
3+
# Functions that should be executed before the build script is run
4+
before_script:
5+
- npm ci
6+
- npm install -g nx
7+
8+
stages:
9+
- lint_and_test
10+
- deploy
11+
12+
lint_test:
13+
stage: lint_and_test
14+
script:
15+
- npx eslint src
16+
- nx test --skip-nx-cache
17+
only:
18+
- branches
19+
20+
pages:
21+
stage: deploy
22+
script:
23+
- nx build --skip-nx-cache
24+
- mkdir -p public
25+
- cp -r dist/FinalProject/browser/* public/
26+
artifacts:
27+
paths:
28+
- public
29+
rules:
30+
# This ensures that only pushes to the 'develop' branch will trigger
31+
# a pages deploy
32+
- if: $CI_COMMIT_REF_NAME == "develop"

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
/.nx/cache
5+
/.nx/workspace-data
6+
.angular

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"firsttris.vscode-jest-runner"
6+
]
7+
}

README.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# <span style="color: #44c596;">Курсовая работа на курсе Т-Банк Финтех <img src="https://cdn.tbank.ru/static/pfa-multimedia/images/ae288629-59d7-4eb6-b074-8bb0549a43b6.svg" alt="image"/></span>
2+
3+
## 🔖 <span style="color: #44c596;">Название проекта:</span>
4+
5+
### <span style="color: #ff8c67; font-style: italic">"Образовательная платформа"</span>
6+
7+
## ✨ <span style="color: #44c596;">Над проектом работали:</span>
8+
9+
### 🎀 1. Матвеева Марина
10+
11+
### 🎗️ 2. Медведев Юрий
12+
13+
### 🎖️ 3. Карпов Антон
14+
15+
## 👁️‍🗨️ <span style="color: #44c596;">Деплой проекта доступен по [ссылке](https://fintech-js-autumn-2024.edu-gitlab.ru/Homeworks/course-work/course-work-MarinaYurijAnton/)</span>
16+
17+
## 🚀 <span style="color: #dd4c1e;">Запуск</span>
18+
19+
#### Клонирование проекта
20+
21+
```sh
22+
git clone [email protected]:fintech-js-autumn-2024/Homeworks/course-work/course-work-MarinaYurijAnton.git
23+
```
24+
25+
#### Установка зависимостей
26+
27+
```sh
28+
cd course-work-MarinaYurijAnton
29+
npm install
30+
```
31+
32+
#### Запуск в режиме разработки
33+
34+
```sh
35+
npm run start
36+
```
37+
38+
#### Сборка проекта
39+
40+
```sh
41+
npm run build
42+
```
43+
44+
#### Запуск тестов
45+
46+
```sh
47+
npm run test
48+
```
49+
50+
## 🎇 Спасибо за внимание❗❗❗
51+
52+

eslint.config.js

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
const nx = require('@nx/eslint-plugin');
2+
const perfectionist = require('eslint-plugin-perfectionist');
3+
4+
module.exports = [
5+
...nx.configs['flat/base'],
6+
...nx.configs['flat/typescript'],
7+
...nx.configs['flat/javascript'],
8+
{
9+
ignores: ['**/dist'],
10+
},
11+
{
12+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
13+
// Override or add rules here
14+
rules: {
15+
'perfectionist/sort-imports': [
16+
'error',
17+
{
18+
type: 'natural',
19+
order: 'asc',
20+
},
21+
],
22+
},
23+
plugins: { perfectionist },
24+
},
25+
...nx.configs['flat/angular'],
26+
...nx.configs['flat/angular-template'],
27+
{
28+
files: ['**/*.ts'],
29+
rules: {
30+
'@angular-eslint/directive-selector': [
31+
'error',
32+
{
33+
type: 'attribute',
34+
prefix: 'app',
35+
style: 'camelCase',
36+
},
37+
],
38+
'@angular-eslint/component-selector': [
39+
'error',
40+
{
41+
type: 'element',
42+
prefix: 'app',
43+
style: 'kebab-case',
44+
},
45+
],
46+
'@typescript-eslint/explicit-member-accessibility': [
47+
'error',
48+
{
49+
accessibility: 'explicit',
50+
overrides: {
51+
accessors: 'explicit',
52+
constructors: 'no-public',
53+
methods: 'explicit',
54+
properties: 'explicit',
55+
parameterProperties: 'explicit',
56+
},
57+
},
58+
],
59+
'@typescript-eslint/explicit-function-return-type': 'error',
60+
},
61+
},
62+
{
63+
files: ['**/*.html'],
64+
// Override or add rules here
65+
rules: {
66+
'@angular-eslint/template/label-has-associated-control': 'warn',
67+
},
68+
},
69+
];

firebase.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"hosting": {
3+
"public": "dist/FinalProject/browser",
4+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
5+
"rewrites": [
6+
{
7+
"source": "**",
8+
"destination": "/index.html"
9+
}
10+
]
11+
}
12+
}

jest.config.ts

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export default {
2+
displayName: 'FinalProject',
3+
preset: './jest.preset.js',
4+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
5+
setupFiles: ['<rootDir>/jest.polyfills.js'],
6+
coverageDirectory: './coverage/FinalProject',
7+
transform: {
8+
'^.+\\.(ts|mjs|js|html)$': [
9+
'jest-preset-angular',
10+
{
11+
tsconfig: '<rootDir>/tsconfig.spec.json',
12+
stringifyContentPathRegex: '\\.(html|svg)$',
13+
},
14+
],
15+
},
16+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
17+
snapshotSerializers: [
18+
'jest-preset-angular/build/serializers/no-ng-attributes',
19+
'jest-preset-angular/build/serializers/ng-snapshot',
20+
'jest-preset-angular/build/serializers/html-comment',
21+
],
22+
testMatch: [
23+
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
24+
'<rootDir>/src/**/*(*.)@(spec|test).[jt]s?(x)',
25+
],
26+
};

jest.polyfills.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const { ReadableStream } = require("node:stream/web");
2+
3+
Object.defineProperties(globalThis, {
4+
ReadableStream: { value: ReadableStream },
5+
});

jest.preset.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const nxPreset = require('@nx/jest/preset').default;
2+
3+
module.exports = { ...nxPreset };

0 commit comments

Comments
 (0)