-
Notifications
You must be signed in to change notification settings - Fork 34
/
package.json
42 lines (42 loc) · 2.18 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"engines": {
"node": ">=20.10.0",
"npm": ">=10.2.3"
},
"volta": {
"node": "20.11.1"
},
"devDependencies": {
"@wordpress/env": "9.5.0",
"npm-run-all": "^4.1.5",
"rimraf": "^5.0.5"
},
"scripts": {
"export:wp-content:themes": "npm run cli cp -- -r wp-content/themes .export/wp-content",
"export:wp-content:uploads": "npm run cli cp -- -r wp-content/uploads .export/wp-content",
"export:wp-content": "rimraf .export/wp-content && mkdir -p .export/wp-content/uploads && run-p export:wp-content:*",
"export:db": "mkdir -p .export/sql && npm run wp db -- export .export/sql/local.sql",
"export": "run-p export:*",
"import:wp-content:themes": "npm run cli cp -- -r .export/wp-content/themes wp-content",
"import:wp-content:uploads": "npm run cli cp -- -r .export/wp-content/uploads wp-content",
"import:wp-content": "run-p import:wp-content:*",
"import:db": "npm run wp db -- import .export/sql/local.sql",
"import": "run-p import:*",
"wp-env": "wp-env",
"start": "wp-env start && open http://localhost:8888",
"stop": "npm run export && wp-env stop",
"cli": "wp-env run cli",
"wp": "wp-env run --env-cwd=wp-content/plugins/smart-custom-fields cli wp",
"composer": "wp-env run --env-cwd=wp-content/plugins/smart-custom-fields cli composer",
"pretest": "wp-env start && npm run composer install -- --no-interaction",
"test:lint:php": "npm run composer lint",
"test:lint": "run-s test:lint:*",
"test:unit:php": "wp-env start && wp-env run --env-cwd=\"wp-content/plugins/smart-custom-fields\" tests-wordpress vendor/bin/phpunit -c .phpunit.xml.dist --verbose",
"test:unit": "run-s test:unit:*",
"test": "run-s test:*",
"clean:zip": "rimraf smart-custom-fields.zip",
"zip:pack": "rsync -a --exclude='/bin' --exclude='/vendor' --exclude='/node_modules' --exclude='.*' --exclude='*.ruleset.xml' --exclude='*.config.js' --exclude='*.xml.dist' --exclude='/tests' --exclude='package*.json' --exclude='/smart-custom-fields.zip' ./ smart-custom-fields",
"zip:archive": "zip -9 -qmr smart-custom-fields.zip smart-custom-fields",
"zip": "npm run clean:zip && npm run zip:pack && wp-env start && npm run composer install -- --no-dev -d smart-custom-fields && npm run zip:archive"
}
}