-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Бойлерплейт состоит из двух отдельных проектов:
- Frontend Server - сервер для отдачи статики, SSR, сессий и склеивания GraphQL-схем. Им занимаются бэкенд-разработчики.
- Frontend - клиентская часть фронтенда, предоставляет Frontend Server статику и middleware для SSR. Им занимаются фронтенд-разработчики.
При сборке нужно сначала собрать Frontend, а затем Frontend Server. При этом Frontend скопируется в node_modules Frontend Server, т.е. деплоить нужно только его.
- Он делается другими людьми и в другом контексте, нежели Frontend.
- Никто не хочет оставлять его в Backend или Frontend.
- Получилось вынести его, не ломая текущий деплой.
- Frontend и Frontend Server должны четко соответствовать друг другу.
- Так проще управлять ветками.
NOTE: It's mandatory to install git hooks before working on individual projects.
NOTE: Each package is individual project and must be opened in separate IDE window.
NOTE: There is no such thing as common dependencies hoist. Treat each package individually (list all dependencies in corresponding package.json).
Root project for high-level operations:
- bootstrapping new project;
- versioning;
- git hooks installation;
- git configuration.
- Yarn v1.9.4;
- Node v8.11.1 (with npm v5.6.0);
- Latest WebStorm or Visual Studio Code;
TBD.
Use yarn lerna version. Simple yarn lerna version minor should be enough. Don't forget to install dependencies first: yarn i.
Just run yarn i.
Use yarn git:configure. Don't forget to install dependencies first: yarn i.
NOTE: It's mandatory to use
yarn iinstead ofyarnoryarn install
-
yarn i: install dependencies with frozen lockfile; -
yarn a: shortcut foryarn add -T -D; -
yarn r: shortcut foryarn remove.
NOTE: Prettier reformats code before commit.
-
prettier:all: reformat all possible files with prettier.
NOTE: Code is checked before commit.
-
lint:js: run eslint;
-
yarn git:configure: set global git config to conventional.
NOTE:
pre-commityarn script should be defined in each package usinglint-staged. Allpre-commitscripts will be run viahuskyon actual commit.
-
yarn prepare-commit-msg: add task prefix to commit message, if necessary; -
yarn commit-msg: validate commit message; -
yarn pre-commit: linters, ts compiler errors, prettier, yarn.lock and package.json check; -
yarn post-commit: hack to update repository in IDE.
Назад | Наверх | Внутрь | Далее
Спасибо за чтение документации ✨
- Home
- Backend
- Frontend Server
-
Frontend
- Структура компонента приложения
- Структура проекта
- Правила именования
- Конфиги
- Источники данных
- Роутинг
- Иконки и картинки
- Шрифты
- Изменение тегов HEAD
- Адаптивность
- Сторонний CSS
- Favicon
- Cache Busting
- Code Splitting
- Обработка ошибок
- Общие компоненты
- Полезные компоненты в других проектах
- Live Templates
- Apollo и REST