Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
lithrel committed Mar 14, 2023
1 parent 8ab2dcd commit 921360f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"mappings": {
"wp-content/themes": "./planet4/themes",
"wp-content/plugins": "./planet4/plugins",
"wp-content/uploads": "./planet4/uploads"
"wp-content/uploads": "./planet4/uploads",
"wp-content/languages": "./planet4/languages"
},
"config": {
"KEY_1": true,
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ We are using [`wp-env`](https://github.com/WordPress/gutenberg/blob/trunk/packag
```
npm run
- env:install Install default Planet 4 theme and database
- env:clean Clean containers and delete all Planet 4 files
- env:clean Clean wp-env and delete all Planet 4 files
- env:config Show generated configuration
- env:fix-permissions [all] Fix files permissions to current user as owner
- env:clean-repos Remove main repos if they are not git repositories
- env:update Update installer, base and main repos
- env:status Status of docker containers
- nro:install <?nro> Install NRO theme and database, if declared in .p4-env.json
- nro:enable Enable installed NRO theme and database
- nro:disable Switch back to default theme and database
Expand All @@ -62,6 +63,7 @@ npm run

## Resources

- https://github.com/WordPress/gutenberg/tree/trunk/packages/env
- https://github.com/WordPress/developer-blog-content/issues/89

## To do
Expand All @@ -73,18 +75,16 @@ npm run
- check why everything is root (missing user with UID used by wp-env ?)
- https://github.com/WordPress/gutenberg/issues/28201 maybe

### NRO
- Full dev install
- Fetch DB, import and switch

### Team
- Pull & activate child-theme individually
### Composer
- execute @site:custom scripts
- figure out replacement of `wp` commands

### Images
- dl default content
- reverse proxy
- similar to nginx, but for Apache2

### Rewrite rules
- adapt to Apache2
- make it work for wpml urls

### WPML
- String Translation issues writing in languages folder
2 changes: 1 addition & 1 deletion scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ generateBaseComposerRequirements(config)
console.log('Installing & activating plugins ...')
run(`wp-env run composer -d /app/${config.appDir}/ update --ignore-platform-reqs`)
installPluginsDependencies(config)
run('wp-env run cli plugin activate --all')

/**
* Images
Expand Down Expand Up @@ -81,6 +80,7 @@ download(
createDatabase(dbName)
importDatabase(`content/${dbDump}`, dbName)
useDatabase(dbName)
run('wp-env run cli plugin activate --all')
run('wp-env run cli user update admin --user_pass=admin --role=administrator')

console.log('Ready !')
1 change: 1 addition & 0 deletions scripts/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function getConfig (override) {
themesDir: wpEnvConfig.mappings['wp-content/themes'],
pluginsDir: wpEnvConfig.mappings['wp-content/plugins'],
uploadsDir: wpEnvConfig.mappings['wp-content/uploads'],
languagesDir: wpEnvConfig.mappings['wp-content/languages'],
verbose: process.env.VERBOSE || false,
...wpEnvConfig,
...override,
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function cloneIfNotExists (path, repo) {
run(`git clone ${repo} ${path}`)
}

function makeDirStructure ({ themesDir, pluginsDir, uploadsDir }) {
run(`mkdir -p ${themesDir} && mkdir -p ${pluginsDir} && mkdir -p ${uploadsDir} && mkdir -p content`)
function makeDirStructure ({ themesDir, pluginsDir, uploadsDir, languagesDir }) {
run(`mkdir -p ${themesDir} && mkdir -p ${pluginsDir} && mkdir -p ${uploadsDir} && mkdir -p ${languagesDir} && mkdir -p content`)
}

function installPluginsDependencies ({ pluginsDir }) {
Expand Down

0 comments on commit 921360f

Please sign in to comment.