Skip to content

Commit 5b598a2

Browse files
authored
Merge pull request #398 from BeAPI/docs/update-readme
docs (README): update readme
2 parents a7ebe08 + d864d12 commit 5b598a2

File tree

2 files changed

+26
-37
lines changed

2 files changed

+26
-37
lines changed

.github/banner-github.png

-13.4 KB
Loading

README.md

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1+
# Be API FrontEnd Framework
2+
13
[![Be API Github Banner](.github/banner-github.png)](https://beapi.fr)
24

3-
# BeAPI FrontEnd Framework
45
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
5-
![Node.js CI](https://github.com/BeAPI/beapi-frontend-framework/workflows/Node.js%20CI/badge.svg?branch=master)
6-
7-
## ℹ️ What is Be API Frontend Framework ?
8-
9-
**Be API Frontend Framework** (BFF) is a friendly Front-end WordPress theme boilerplate to help you to start your own WordPress theme with modern tools.
106

11-
## ⚒️ Main tools
12-
* [Webpack 5](https://webpack.js.org/) JS, CSS and assets are built with Webpack.
13-
* [Esbuild Loader](https://github.com/privatenumber/esbuild-loader) for ESNext & TypeScript transpilation.
14-
* [Eslint](https://eslint.org/) for JS code style.
15-
* [Stylelint](https://stylelint.io/) for CSS code style.
16-
* [CSSNano](https://cssnano.co/) for CSS optimization
17-
* [PostCSS Preset Env](https://github.com/csstools/postcss-preset-env) for modern CSS properties compatibility.
18-
* [PostCSS PX to REM](https://github.com/cuth/postcss-pxtorem) to automatically convert px units to rem.
19-
* [PostCSS Sort Media Queries](https://github.com/solversgroup/postcss-sort-media-queries) to combine multiple similar medie queries declarations.
20-
* [SVGO](svgo-loader) for SVG optimization.
21-
* [Image Webpack Loader](image-webpack-loader) for images optimization.
22-
* [Browser Sync](https://browsersync.io/) to test your project on different devices.
7+
## What is BFF ?
238

9+
**Be API Frontend Framework** *(or BFF)* is a WordPress theme boilerplate designed to assist you in launching your own WordPress theme using modern tools.
2410

25-
26-
## 🔴 Requirements
11+
## Requirements
2712

2813
### Composer
14+
2915
You need composer to autoload all your classes from the inc folder.
3016

3117
Use the `beapi/composer-scaffold-theme` package that add it automatically to the composer.json file.
@@ -40,11 +26,12 @@ You can add it yourself like this :
4026
```
4127

4228
### Autoload
29+
4330
The autoload is based on psr-4 and handled by composer.
4431

45-
### Node 12+
32+
### Node.js
4633

47-
You need a minimum of Node 12. Version 14 is recommended.
34+
You need [the latest stable version of Node.js](https://nodejs.org/).
4835

4936
## Installation
5037

@@ -65,32 +52,32 @@ Of course, you can rename `beapi-frontend-framework` to define your WordPress th
6552
Next, go to your theme folder (in the following example, I didn't rename `beapi-frontend-framework`) with your favorite Term software.
6653

6754
```bash
68-
$ cd wp-content/themes/beapi-frontend-framework
55+
cd wp-content/themes/beapi-frontend-framework
6956
```
7057

7158
Then install node dependencies with Yarn.
59+
7260
```bash
73-
$ yarn
61+
yarn
7462
```
63+
7564
Alternatively, you can use NPM.
65+
7666
```bash
77-
$ npm install
67+
npm install
7868
```
7969

80-
## ⚙️ Configuration
70+
## Configuration
8171

8272
The configurations files are in `config` directory.
73+
8374
### Webpack
75+
8476
You can find the common Webpack settings file in `webpack.common.js`. For development mode purpose, you can edit `webpack.dev.js` file and for production mode, you can edit `webpack.prod.js`.
8577
You also have the loaders in `loaders.js` file and Webpack's plugin in `plugins.js` file.
8678

87-
### Babel
88-
You can find a `.babelrc` file to modify Babel configuration.
79+
## How to use BFF ?
8980

90-
### Eslint
91-
You can find a `.eslintrc` file to modify Eslint configuration.
92-
93-
## 🚀 How to use BFF ?
9481
After installing dependencies, you can run some commands which are explained below.
9582

9683
### Start with Browser Sync
@@ -100,23 +87,25 @@ BFF is configured to work with [lando](https://lando.dev/). If you have a `.land
10087
```js
10188
let fileContents = fs.readFileSync('../../../../.lando.yml', 'utf8')
10289
```
103-
Then, run the following command from the theme :
10490

91+
Then, run the following command from the theme :
10592

10693
```bash
107-
$ yarn start
94+
yarn start
10895
```
96+
10997
BrowserSync will proxy your lando'server based on the name defined in your `.lando.yml`.
98+
11099
### Build
111100

112101
```bash
113-
$ yarn build
102+
yarn build
114103
```
115104

116105
### Bundle report
117106

118107
You can launch a bundle report with the following command :
119108

120109
```bash
121-
$ yarn bundle-report
122-
```
110+
yarn bundle-report
111+
```

0 commit comments

Comments
 (0)