From b427fb9c0c0f816a0a42320bd5d0520c42dbe5df Mon Sep 17 00:00:00 2001 From: rajinsharwar2 Date: Mon, 20 May 2024 20:55:55 -0400 Subject: [PATCH] Use wp-scripts instead of npm where applicable --- package.json | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c567c21..700a586 100644 --- a/package.json +++ b/package.json @@ -6,21 +6,23 @@ "license": "MIT", "private": true, "scripts": { - "prod": "NODE_ENV=production webpack --progress && npm run pot", - "dev": "webpack --watch --progress", + "prod": "NODE_ENV=production wp-scripts build && npm run pot", + "dev": "wp-scripts start", "clean": "rm -rf assets/build/*", "init": "./bin/init.js && npm run pot", - "lint:css": "stylelint assets/src/sass/**/*.scss --syntax scss", - "lint:js": "eslint assets/src/js/", "lint:php": "./vendor/bin/phpcs", "lint:php:fix": "./bin/phpcbf.sh", + "lint:css": "wp-scripts lint-style '/assets/src/sass/**/*.scss'", + "lint:js": "wp-scripts lint-js ./assets/src/js/", "lint:staged": "lint-staged", "pot": "wp-pot --src './**/*.php' --dest-file './languages/blank-theme.pot' --domain 'blank-theme' --package 'Blank Theme' ", "precommit": "npm-run-all lint:* pot", "prepare": "husky install && npm run init" }, "dependencies": { + "eslint-plugin-prettier": "^4.0.0", "foundation-sites": "^6.6.3", + "prettier": "^2.8.8", "webfontloader": "^1.6.28" }, "devDependencies": { @@ -28,8 +30,11 @@ "@wordpress/browserslist-config": "^4.0.1", "@wordpress/dependency-extraction-webpack-plugin": "^3.1.4", "@wordpress/eslint-plugin": "^9.0.6", + "@wordpress/scripts": "^27.9.0", "@wordpress/stylelint-config": "^19.0.5", "babel-loader": "^8.2.2", + "cross-env": "^7.0.3", + "cross-spawn": "^7.0.3", "css-loader": "^5.2.6", "eslint": "^7.27.0", "eslint-webpack-plugin": "^2.5.4",