Skip to content

Conversation

@nani-samireddy
Copy link
Member

@nani-samireddy nani-samireddy commented Feb 11, 2025

Description

This PR updates the npm scripts to use wp-scripts for linting and bundling.

Technical Details

  • Update npm scripts to use wp-scripts to for linting and bundling.
  • Update lint-staged configuration to lint the package.json also
  • Update package.json with keywords, homepage, repository and bugs fields
  • Update eslint and stylelint configurations

Following are the list of updated/newly added npm scripts

Command Description
build:dev Sets the environment to development and runs non-dev and non-prod build tasks.
build:prod Sets the environment to production and runs non-dev and non-prod build tasks.
build:js Builds JavaScript using wp-scripts with experimental modules support.
start Starts the development server with wp-scripts and experimental modules.
lint:all Runs all linting tasks in parallel.
lint:css Lints CSS files in ./assets/src directory using wp-scripts.
lint:css:fix Lints and automatically fixes CSS files in ./assets/src directory.
lint:js Lints JavaScript files in ./assets/src directory using wp-scripts.
lint:js:fix Lints and automatically fixes JavaScript files in ./assets/src directory.
lint:js:report Lints JavaScript files and generates a JSON report of linting results.
lint:php Lints PHP files using PHP CodeSniffer (phpcs).
lint:php:fix Automatically fixes PHP files using PHP Code Beautifier (phpcbf).
lint:package-json Lints package.json while ignoring files listed in .gitignore.
lint:staged Runs linting tasks only on staged files using lint-staged.
build:pot Generates .pot files for translation using composer.
wp-env Starts and manages the local WordPress development environment (wp-env).

Steps to Test

  1. Clone the blank-theme repo into the themes folder.
  2. Open the terminal in the blank-theme folder and install the dependencies with composer install
  3. Setup the theme ( optional )
  4. Make any changes and run the above respective commands.

Fixes/Covers issue

@nani-samireddy nani-samireddy changed the base branch from master to feature/add-dependent-bot February 11, 2025 13:04
@nani-samireddy nani-samireddy self-assigned this Feb 11, 2025
@nani-samireddy nani-samireddy marked this pull request as ready for review February 11, 2025 16:54
@nani-samireddy nani-samireddy changed the base branch from feature/add-dependent-bot to master February 11, 2025 18:29
@divyarajmasani divyarajmasani merged commit ba31a5d into master Feb 12, 2025
2 checks passed
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.

3 participants