WordPress / WordPress/wordpress-playground

Compatibility with Windows and WSL

Open
#435 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Developer Experience [Type] Enhancement
Dominant language
JavaScript
Stars
2k
Forks
462
Avg merge
18h 44m
Merged PRs (30d)
33

Description

I want to contribute to this project and attempted to build the project. I am using Windows OS and could not build it because of the UNIX-derived commands used.

For example, the cp command is not recognized as follows (the equivalent command is copy on Windows) :

nx run wp-now:"build:bundle"

> nx run wp-now:"build:bundle"

'cp' is not recognized as an internal or external command,
operable program or batch file.
Warning: run-commands command "cp packages/wp-now/public/* dist/packages/wp-now" exited with non-zero status code

 ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target build:bundle for project wp-now (653ms)
 
    ×    1/1 failed
    √    0/1 succeeded [0 read from cache]

So, after a quick look at the commands property of project.json, it seems that the following commands are not available on Windows:

  • rm
  • zip
  • cp
  • cat

The three solutions I know of are as follows:

I know it is very difficult to build an OS-independent development environment for such an advanced project, but I would be happy to help in any way I can.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the commands property in the relevant project.json and reproduce nx run wp-now:"build:bundle" on Windows or WSL. Check the listed rm, zip, cp, and cat commands, then verify the build completes without requiring Unix-only utilities and that the affected targets still produce their expected outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.