Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy to GithubPages

on: pull_request
permissions:
contents: write
jobs:
deploy-to-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install Packages
run: |
npm ci

- name: Build prod

run: |
npm run build
cp dist/index.html dist/404.html

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist # The folder the action should deploy.
22 changes: 22 additions & 0 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint and Test

on: pull_request
permissions:
contents: write
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Install Packages
run: |
npm ci

- name: Lint
run: npm run lint

- name: test
run: npm test

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ testem.log
# System files
.DS_Store
Thumbs.db

src/app/environments
ssl/
20 changes: 20 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Angular BleedCode-components

## TO DO

Создать компоненты:
- [ ] Управление задачами
- [ ] Фильтр задач
- [ ] Убрать лишний элемент управления тегами
- [ ] Список задач
- [ ] Страница редактирования задачи
- [ ] Управление тегами
- [ ] Управление пользователями
- [ ] Показываем список пользователей
- [ ] Добавление нового пользователями
- [ ] Форма добавления нового пользователя
- [ ] Изменение статуса пользователя (зарегистрирован, удалён и т.д.)
- [ ] Удаление пользователя (он останется в списке, но будет помечен, как удалённый)
- [ ] Изменение роли: пользователь / Интервьюер
- [ ] Изменение пароля?
- [ ]
32 changes: 28 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "bleedcode-cms",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
Expand All @@ -21,12 +21,18 @@
],
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "node_modules/monaco-editor",
"output": "/assets/monaco/"
},
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"@angular/material/prebuilt-themes/azure-blue.css",
"src/styles.css"
],
"scripts": []
Expand All @@ -50,13 +56,24 @@
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
"sourceMap": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.development.ts"
}
]
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"ssl": true,
"sslKey": "./ssl/cert.key",
"sslCert": "./ssl/cert.crt"
},
"configurations": {
"production": {
"buildTarget": "bleedcode-cms:build:production"
Expand All @@ -82,15 +99,22 @@
{
"glob": "**/*",
"input": "public"
},
{
"glob": "**/*",
"input": "node_modules/monaco-editor",
"output": "/assets/monaco/"
}
],
"styles": [
"@angular/material/prebuilt-themes/azure-blue.css",
"src/styles.css"
],
"scripts": []
"scripts": [],
"karmaConfig": "karma.conf.js"
}
}
}
}
}
}
}
170 changes: 170 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
// @ts-check
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const angular = require("angular-eslint");
const stylistic = require("@stylistic/eslint-plugin");

module.exports = tseslint.config(

{
files: ['src/**/*.{js,ts,mts,tsx}'],
ignores: ['node_modules/**', 'dist/**', '.angular/**'],
rules: {
"arrow-spacing": ["error", {
"before": true,
"after": true
}],
"curly": ["error"],
'computed-property-spacing': ["error", "never"],
"no-whitespace-before-property": "error",
"no-console": ["error", { "allow": ["warn", "error"] }],
"space-in-parens": ["error", "never"],
// "@stylistic/space-infix-ops": "error",
},
},
{
files: ["**/*.ts"],
extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...angular.configs.tsRecommended,
stylistic.configs["recommended-flat"],

],
processor: angular.processInlineTemplates,
rules: {
"arrow-spacing": ["error", {
"before": true,
"after": true
}],
"curly": ["error"],
'computed-property-spacing': ["error", "never"],
"no-whitespace-before-property": "error",
"no-console": ["error", { "allow": ["warn", "error"] }],
"space-in-parens": ["error", "never"],
"@stylistic/space-infix-ops": "error",
"@stylistic/arrow-spacing": "error",
"@stylistic/object-curly-newline": ["error", { "minProperties": 2 }],
"@stylistic/object-property-newline": "error",
"@stylistic/arrow-parens": ["error", "always"],
"@stylistic/object-curly-spacing": ["error", "never"],
"@stylistic/space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always",
}],
"@stylistic/semi": ["error", "always"],
"@stylistic/no-extra-semi": "error",
"@stylistic/semi-spacing": ["error", {
"before": false,
"after": true
}],
"@stylistic/key-spacing": ["error", {
"beforeColon": false,
"afterColon": true,
}],
"@stylistic/no-trailing-spaces": ["error", {
"skipBlankLines": true,
"ignoreComments": true
}],
"@stylistic/block-spacing": ["error", "never"],
"@stylistic/no-multi-spaces": ["error", { ignoreEOLComments: true }],
"@stylistic/newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
"@stylistic/lines-between-class-members": ["error", "always"],
"@stylistic/no-multiple-empty-lines": ["error", {
"max": 1,
"maxBOF": 0,
"maxEOF": 0
}],
"@stylistic/comma-spacing": ["error", {
"before": false,
"after": true
}],
"@stylistic/padding-line-between-statements": [
"error",
{
blankLine: "never",
prev: "*",
next: "*"
},
//
{
blankLine: "always",
prev: "*",
next: "function"
},
//
{
blankLine: "always",
prev: "*",
next: "return"
},

//
{
blankLine: "always",
prev: "*",
next: ["const", "let", "var"]
},
{
blankLine: "always",
prev: ["const", "let", "var"],
next: "*"
},
{
blankLine: "never",
prev: ["const", "let", "var"],
next: ["const", "let", "var"]
},
//
{
blankLine: "always",
prev: "import",
next: "*"
},
{
blankLine: "never",
prev: "import",
next: "import"
},
//
{
blankLine: "always",
prev: "*",
next: "export"
},
{
blankLine: "never",
prev: "export",
next: "export"
},

],
// "@angular-eslint/directive-selector": [
// "error",
// {
// type: "attribute",
// prefix: "app",
// style: "camelCase",
// },
// ],
// "@angular-eslint/component-selector": [
// "error",
// {
// type: "element",
// prefix: "app",
// style: "kebab-case",
// },
// ],
},
},
{
files: ["**/*.html"],
extends: [
...angular.configs.templateRecommended,
...angular.configs.templateAccessibility
],
rules: {},
}
);
50 changes: 50 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
random: false
},
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/bleedcode-cms'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/angu-unit-test'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},

reporters: ['progress', 'kjhtml'],
browsers: ['Chrome'],
restartOnFileChange: true,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
Loading