Skip to content

NPM Commands

Manish-Sequoia edited this page Aug 19, 2022 · 1 revision

Following are the useful npm commands while developing theme using this base theme.

npm install

# if throw error in console, try below command
npm install --legacy-peer-deps

Compile Assets

npm run dev       # During development
npm run prod      # Generate production ready minified assets

Other Commands

# Generate pot files
npm run pot

# Lint CSS, JS and PHP
npm run lint:css
npm run lint:js

Theme Standards

Check the code quality for the current theme. Run following command from theme directory wp-content/themes/base-theme/

# Test with default phpcs.xml file config
phpcs --standard=phpcs.xml ./

# Test against VIP Coding Standard
phpcs -d memory_limit=1024M --standard=WordPress-VIP-Go,WordPressVIPMinimum -s --ignore=vendor,node_modules,tests,apigen,predis,build ./

Clone this wiki locally