Сайт Fakel Gym
https://fakelgym.cp.good-production.xyz/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.0 KiB
49 lines
2.0 KiB
# Тема для сайта Fakel Gym
|
|
## Установка
|
|
1. Клонировать репозиторий в папку тем WordPress
|
|
2. Добавить remote для компонентов:
|
|
```bash
|
|
git remote add la-components https://git.good-production.xyz/Good-Production/la-components-wp.git
|
|
```
|
|
3. Скачать компоненты через git subtree:
|
|
```bash
|
|
git subtree pull --prefix=template-parts/la-components la-components master
|
|
```
|
|
4. Установить зависимости: `npm install`
|
|
5. Собрать ассеты: `npm run dev` или `npm run production`
|
|
|
|
## Разработка
|
|
- `npm run watch` - отслеживание изменений
|
|
- `npm run dev` - сборка для разработки
|
|
- `npm run production` - сборка для продакшена
|
|
|
|
## Git Subtree
|
|
Проект использует git subtree для подключения переиспользуемых компонентов la-components.
|
|
|
|
### Структура
|
|
- `template-parts/la-components/` - подключенный через subtree репозиторий с компонентами
|
|
|
|
### Команды для работы с subtree
|
|
|
|
#### Обновить компоненты (получить изменения из la-components):
|
|
```bash
|
|
git subtree pull --prefix=template-parts/la-components la-components master
|
|
```
|
|
|
|
#### Отправить изменения обратно в la-components:
|
|
```bash
|
|
git subtree push --prefix=template-parts/la-components la-components master
|
|
```
|
|
|
|
#### Посмотреть историю изменений в subtree:
|
|
```bash
|
|
git log --oneline template-parts/la-components/
|
|
```
|
|
|
|
## Структура проекта
|
|
- `resources/` - исходные файлы стилей и скриптов
|
|
- `css/` - скомпилированные CSS файлы
|
|
- `js/` - JavaScript файлы
|
|
- `template-parts/` - части шаблонов
|
|
- `la-components/` - компоненты из subtree
|
|
|
|
|