You've already forked wp-bootstrap
Remove yarn, use npm exclusively
Replace all yarn references with npm across README, CLAUDE.md, CHANGELOG, .gitignore, and CI workflow. Remove yarn.lock. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,6 @@ jobs:
|
||||
-x "${THEME_NAME}/src/*" \
|
||||
-x "${THEME_NAME}/package.json" \
|
||||
-x "${THEME_NAME}/package-lock.json" \
|
||||
-x "${THEME_NAME}/yarn.lock" \
|
||||
-x "${THEME_NAME}/composer.json" \
|
||||
-x "${THEME_NAME}/composer.lock" \
|
||||
-x "${THEME_NAME}/.gitignore" \
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -15,8 +15,8 @@ vendor/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Yarn
|
||||
yarn-error.log
|
||||
# npm
|
||||
npm-debug.log
|
||||
|
||||
# Backup files
|
||||
*.bak
|
||||
|
||||
@@ -27,7 +27,7 @@ All notable changes to this project will be documented in this file.
|
||||
### Added
|
||||
|
||||
- Initial theme scaffolding
|
||||
- Bootstrap 5 CSS and JS integration (served locally via Yarn)
|
||||
- Bootstrap 5 CSS and JS integration (served locally via npm)
|
||||
- SASS build pipeline with Dart Sass, PostCSS, Autoprefixer, cssnano
|
||||
- Twig 3.0 template engine integration via Composer
|
||||
- FSE templates: index, home, single, page, archive, search, 404
|
||||
|
||||
@@ -44,7 +44,7 @@ Next milestone is **v0.2.0 - Design Editor**. See `PLAN.md` for details.
|
||||
- **Template Engine:** Twig 3.0 (via Composer)
|
||||
- **Frontend:** Bootstrap 5 Javascript & Vanilla JavaScript
|
||||
- **Styling:** Bootstrap 5 & Custom CSS (if necessary)
|
||||
- **Dependency Management:** Composer (PHP), npm/Yarn (JS/CSS)
|
||||
- **Dependency Management:** Composer (PHP), npm (JS/CSS)
|
||||
- **Internationalization:** WordPress i18n (.pot/.po/.mo files)
|
||||
- **Canonical Plugin Name:** `wp-bootstrap`
|
||||
|
||||
@@ -178,7 +178,7 @@ Build steps (in order):
|
||||
3. `scss` — Compile SCSS (`src/scss/`) to CSS (`assets/css/`)
|
||||
4. `postcss` — Autoprefixer + cssnano minification → `assets/css/style.min.css`
|
||||
|
||||
**CI/CD note:** The Gitea workflow uses `npm install` and `npm run build` (not `yarn`). The CI runner does not have `yarn` available.
|
||||
**CI/CD note:** The Gitea workflow uses `npm install` and `npm run build`.
|
||||
|
||||
### Architecture Notes
|
||||
|
||||
@@ -205,7 +205,7 @@ Build steps (in order):
|
||||
|
||||
**Key learnings:**
|
||||
|
||||
- `actions/setup-node@v4` does not install `yarn` — use `npm install` / `npm run build` in CI workflows
|
||||
- CI uses `npm install` / `npm run build` — `yarn` is not available in the CI runner
|
||||
- Bootstrap 5 alert colors are hardcoded (not CSS variables), so explicit dark mode overrides are needed in SCSS
|
||||
- Anti-flash for dark mode requires a synchronous inline script via `wp_add_inline_script('handle', '...', 'before')` — the deferred JS alone causes a flash
|
||||
- Variable fonts use `fontWeight: "100 900"` range syntax in `theme.json` `fontFace` declarations
|
||||
|
||||
14
README.md
14
README.md
@@ -31,8 +31,8 @@ A modern WordPress Block Theme built from scratch with Bootstrap 5.
|
||||
git clone ssh://git@src.bundespruefstelle.ch:2022/magdev/wp-bootstrap.git
|
||||
cd wp-bootstrap
|
||||
composer install
|
||||
yarn install
|
||||
yarn build
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
## Development
|
||||
@@ -40,7 +40,7 @@ yarn build
|
||||
### Prerequisites
|
||||
|
||||
- Node.js 20+
|
||||
- Yarn
|
||||
- npm
|
||||
- Composer
|
||||
- PHP 8.3+
|
||||
|
||||
@@ -48,10 +48,10 @@ yarn build
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `yarn build` | Compile SCSS, minify CSS, copy Bootstrap JS |
|
||||
| `yarn dev` | Watch SCSS files and recompile on changes |
|
||||
| `yarn scss` | Compile SCSS only |
|
||||
| `yarn postcss` | Minify CSS with Autoprefixer |
|
||||
| `npm run build` | Compile SCSS, minify CSS, copy Bootstrap JS |
|
||||
| `npm run dev` | Watch SCSS files and recompile on changes |
|
||||
| `npm run scss` | Compile SCSS only |
|
||||
| `npm run postcss` | Minify CSS with Autoprefixer |
|
||||
| `composer install` | Install PHP dependencies |
|
||||
|
||||
### Project Structure
|
||||
|
||||
Reference in New Issue
Block a user