Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/bootstrap #253

Merged
merged 4 commits into from
Sep 11, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
run:
name: Version
runs-on: ubuntu-latest

if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-19706e7e35-9.zip
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-afc6995412-9.zip
Binary file not shown.
377,873 changes: 376,620 additions & 1,253 deletions .yarn/releases/yarn-remote.cjs

Large diffs are not rendered by default.

73 changes: 59 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,69 @@

[//]: # 'VERSIONS'

[<img src="https://img.shields.io/static/v1?style=for-the-badge&label=%40atls%2Fcode-service&message=0.0.20&labelColor=ECEEF5&color=D7DCEB">](https://npmjs.com/package/@atls/code-service) [<img src="https://img.shields.io/static/v1?style=for-the-badge&label=%40atls%2Fschematics&message=0.0.15&labelColor=ECEEF5&color=D7DCEB">](https://npmjs.com/package/@atls/schematics)
[<img src="https://img.shields.io/static/v1?style=for-the-badge&label=%40atls%2Fcode-service&message=0.0.22&labelColor=ECEEF5&color=D7DCEB">](https://npmjs.com/package/@atls/code-service) [<img src="https://img.shields.io/static/v1?style=for-the-badge&label=%40atls%2Fschematics&message=0.0.17&labelColor=ECEEF5&color=D7DCEB">](https://npmjs.com/package/@atls/schematics)

[//]: # 'VERSIONS'

Монорепозиторий с набором инструментов и утилит, разработанных нашей командой, чтобы упростить разработку и работу над проектами.

Инструменты предназначены для использования в проектах на JavaScript и TypeScript и направлены на обеспечение согласованного опыта разработки и повышения производительности.

## ⚒️&nbsp;&nbsp;Некоторые из инструментов, включённых в этот репозиторий:

📦&nbsp;&nbsp; `Конфигурации для разных инструментов и библиотек (например, Jest, TypeScript, Prettier)` <br>
<br>
✨&nbsp;&nbsp; `Линтинг и форматирование кода`<br>
<br>
🔒&nbsp;&nbsp; `Pre-commit хуки для обеспечения качества кода`<br>
<br>
🧪&nbsp;&nbsp; `Тест-раннеры и утилиты`<br>
<br>
🏗️&nbsp;&nbsp; `Инструменты для сборки и бандлеры`<br>
<br>
📚&nbsp;&nbsp; `Генераторы кода и шаблоны`
## Начало использования

**ВАЖНО:** Мы используем [собственный бандл](https://yarnpkg.com/builder/cli/build/bundle) ярна для запуска собственных скриптов.

Для начала использования нашей сборки:
- `yarn set version https://raw.githubusercontent.com/atls/tools/master/yarn/cli/bundles/yarn.js` - эта команда установит вместо стокового ярна наш и положит в папку .yarn/releases, если же наша сборка уже установленна - произойдёт обновление до актуальной версии

## Основные скрипты `yarn` для нашей работы

Помимо стандартных скриптов `yarn` мы используем наши кастомные для облегчения работы:

### Общие

- `yarn check` - выполняет `typecheck`, `lint`, `format`. Выполняется так же автоматически при коммитах с помощью `husky`. <span style="font-weight: bold">Выполняем перед созданием Pull Request</span>
- `yarn files changed list` - вывод списка измененных файлов
- `yarn commit ...` - работа с коммитами
- `message` - сообщение коммита
- `staged` - стэйдж коммита

### Основные проверки

- `yarn typecheck` - проверяет тайпчеком проект
- `yarn lint` - проверяет линтером проект

### Форматирование

- `yarn format` - форматирует весь проект по нашему конфигу `prettier`

### Генерация

- `yarn generate project` - генерация схематики проекта
- `yarn badges generate` - генерирует бэйджи в корневом **README.md** по версиям в корневом **package.json**

### Билд

- `yarn service build` - билд проекта
- `yarn service dev` - дев разработка проекта
- `yarn library build`
- `yarn image pack`

### Тестирование

- `yarn test ...` - тестирование
- `integration` - интеграционные тесты
- `unit` - юнит тесты

### Проверка проекта на ошибки

- `yarn workspaces changed foreach image pack --publish --tag-policy hash-timestamp --registry some` - билд пакетов с изменениями.
- `yarn workspaces foreach image pack --publish --tag-policy hash-timestamp --registry some` - билд приложения целиком.

## Наши файлы конфигурации

[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)](https://github.com/atls/tools/blob/557cd9458c527b060e02316bc35469e208a800f2/config/typescript/src/index.ts)
[![ESLint](https://img.shields.io/badge/ESLint-4B3263?style=for-the-badge&logo=eslint&logoColor=white)](https://github.com/atls/tools/blob/557cd9458c527b060e02316bc35469e208a800f2/config/eslint/src/index.ts)
[![Prettier](https://img.shields.io/badge/prettier-1A2C34?style=for-the-badge&logo=prettier&logoColor=F7BA3E)](https://github.com/atls/tools/blob/557cd9458c527b060e02316bc35469e208a800f2/config/prettier/src/index.ts)
[![Jest](https://img.shields.io/badge/-jest-%23C21325?style=for-the-badge&logo=jest&logoColor=white)](https://github.com/atls/tools/blob/557cd9458c527b060e02316bc35469e208a800f2/config/jest/src/index.ts)
[![Webpack](https://img.shields.io/badge/webpack-%238DD6F9.svg?style=for-the-badge&logo=webpack&logoColor=black)](https://github.com/atls/tools/blob/8537e2f78ca5a2bd925548efce21a2d5c4800543/code/code-service/src/webpack.config.ts)
15 changes: 11 additions & 4 deletions code/code-format-worker/src/formatter.worker.content.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions code/code-lint-worker/src/linter.worker.content.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/code-pack/src/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const pack = async (
'--descriptor',
descriptorPath,
'--buildpack',
buildpack || 'atlantislab/buildpack-yarn-workspace:0.0.3',
buildpack || 'atlantislab/buildpack-yarn-workspace:0.0.4',
'--builder',
builder || 'atlantislab/builder-base:buster',
'--tag',
Expand Down
15 changes: 11 additions & 4 deletions code/code-schematics-worker/src/schematics.worker.content.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions code/code-service-worker/src/service.worker.content.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
let hook;
let hook

module.exports.getContent = () => {
if (typeof hook === `undefined`)
hook = require('zlib').brotliDecompressSync(Buffer.from('GwADYKwKzHNdR5Lmmgpp3k4Oz2Jh1jZTfb54D9uv77mlKqK2YdA1WYIo9BXQVL3d1ZFTJolQWXBqNKxRyo/7rN05PQUZE7wg9RLUnC4cKi6OynH5mohCkSLaa8l7MrSesVmfOTX2Syi+1Ui4x80VpWS3Qs0Fqad877rQ7FTDHJDe9xwkfq2b/EI7Uj/n4UqmEfIQ9HP9mR8cUTf7uJ8xYsdJELOTPg0fPn5VuQxVKch+R7D+uQGNdwDeIUo+pIZCkLKGWawftpDEMzN+fiv2Cc8ZCe9pz3auifPL+xdJ0aTo1FTejLSmKH//Ps4mFE+NEkELeuI5a1bdpfE80YKmpsNVXi7lCtABacn+PM1G8NSshOzLjrcNZs+OQuhTJxYB', 'base64')).toString();
hook = require('zlib')
.brotliDecompressSync(
Buffer.from(
'GwADYKwKzHNdR5Lmmgpp3k4Oz2Jh1jZTfb54D9uv77mlKqK2YdA1WYIo9BXQVL3d1ZFTJolQWXBqNKxRyo/7rN05PQUZE7wg9RLUnC4cKi6OynH5mohCkSLaa8l7MrSesVmfOTX2Syi+1Ui4x80VpWS3Qs0Fqad877rQ7FTDHJDe9xwkfq2b/EI7Uj/n4UqmEfIQ9HP9mR8cUTf7uJ8xYsdJELOTPg0fPn5VuQxVKch+R7D+uQGNdwDeIUo+pIZCkLKGWawftpDEMzN+fiv2Cc8ZCe9pz3auifPL+xdJ0aTo1FTejLSmKH//Ps4mFE+NEkELeuI5a1bdpfE80YKmpsNVXi7lCtABacn+PM1G8NSshOzLjrcNZs+OQuhTJxYB',
'base64'
)
)
.toString()

return hook;
};
return hook
}
15 changes: 11 additions & 4 deletions code/code-test-worker/src/tester.worker.content.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions code/code-typescript-worker/src/typescript.worker.content.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"unplugged": true
}
},
"packageManager": "[email protected].0",
"packageManager": "[email protected].3",
"tools": {
"schematic": {
"collection": "@atls/schematics",
Expand Down
Loading
Loading