Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add standalone commands #26

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Add standalone commands #26

wants to merge 18 commits into from

Conversation

rmccue
Copy link
Member

@rmccue rmccue commented Mar 9, 2018

Fixes #24.

  • Converts the repo to a Lerna monorepo
  • Adds three new packages: @humanmade/create-react-wp-project, the common core of the commands; and create-react-wp-plugin and create-react-wp-theme, the user-facing commands
  • Renames react-wp-scripts.php to loader.php
  • Additionally adds either plugin.php for plugins or functions.php and style.css for themes to create a minimal plugin/theme
  • Automatically generates the PHP namespace from the last component of the path

To do:

  • Rewrite documentation for new setup
  • Testing, testing, testing
  • Switch to react-wp-scripts instead of temporary file reference

@rmccue
Copy link
Member Author

rmccue commented Mar 9, 2018

ping @kadamwhite @igmoweb @tfrommen for thoughts

@rmccue rmccue changed the title WIP: Add standalone commands Add standalone commands Mar 10, 2018
@rmccue
Copy link
Member Author

rmccue commented Mar 10, 2018

This is ready to go, so time for review! 😁

@rmccue
Copy link
Member Author

rmccue commented May 15, 2018

@kadamwhite Ever get a chance to review this? :)

@rmccue
Copy link
Member Author

rmccue commented Oct 27, 2018

@kadamwhite Ping :D

@kadamwhite
Copy link
Collaborator

I'm unable to test this because no matter what I do with npm link, during the npx create-react-wp-plugin step the project blows up because new-plugin/node_modules/react-wp-scripts/scripts/init-extra.js is missing. If you have working steps for how to test, please advise.

Merge conflicts also need to be addressed. I know that's my fault for delaying in my review, but if you can update then I'll prioritize this.

@igmoweb
Copy link
Contributor

igmoweb commented Dec 5, 2018

@kadamwhite Would this command work?

create-react-app --scripts-version git+https://[email protected]/humanmade/react-wp-scripts.git#init-commands .

@roborourke
Copy link
Contributor

Latest CRA version allows you to specify --scripts-version file:path/to/my-scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants