/
package.json
76 lines (76 loc) · 3.79 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"engines": {
"node": ">=20.10.0",
"npm": ">=10.2.3"
},
"volta": {
"node": "20.11.1"
},
"author": "inc2734",
"license": "GPL-2.0+",
"dependencies": {},
"devDependencies": {
"@inc2734/add-custom-event": "^0.5.0",
"@wordpress/browserslist-config": "^5.36.0",
"@wordpress/env": "^9.5.0",
"@wordpress/scripts": "^27.4.0",
"autoprefixer": "^10.4.18",
"browser-sync": "^3.0.2",
"classnames": "^2.5.1",
"cssnano": "^6.1.0",
"eslint-plugin-import": "^2.29.1",
"node-sass": "^9.0.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.35",
"postcss-cli": "^11.0.0",
"prettier": "npm:wp-prettier@3.0.3",
"rimraf": "^5.0.5",
"sass-basis": "^18.2.2"
},
"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": "npm run cli 'rm -rf .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 cli --env-cwd=\"wp-content/plugins/snow-monkey-forms\" wp",
"composer": "wp-env run --env-cwd=\"wp-content/plugins/snow-monkey-forms\" cli composer",
"clean:js": "rimraf dist/js",
"clean:css": "rimraf dist/css",
"build": "npm-run-all -p js blocks css",
"blocks:format": "wp-scripts format src/blocks",
"blocks:build": "rimraf dist/blocks && wp-scripts build --output-path=dist",
"blocks:css": "node-sass -r src/blocks -o dist/blocks && postcss dist/blocks/**/*.css -r",
"blocks": "run-s blocks:format blocks:build blocks:css",
"js": "npm run clean:js && wp-scripts build src/js/app src/js/blocks src/js/recaptcha --output-path=dist/js --webpack-src-dir=src/js",
"css:build": "node-sass src/css -o dist/css && postcss dist/css/*.css -r",
"css": "npm run clean:css && npm-run-all -p css:*",
"pretest": "wp-env start && npm run composer install -- --no-interaction",
"test:lint:js": "wp-scripts lint-js hoc src/blocks src/js",
"test:lint:php": "wp-env start && npm run composer lint",
"test:lint": "run-s test:lint:*",
"test:unit:php": "wp-env start && wp-env run --env-cwd=\"wp-content/plugins/snow-monkey-forms\" tests-wordpress vendor/bin/phpunit -c .phpunit.xml.dist --verbose",
"test:unit": "run-s test:unit:*",
"test": "run-s test:*",
"format:php": "npm run composer format",
"format:js": "wp-scripts format hoc src/js src/blocks",
"format": "npm-run-all -p format:*",
"clean:zip": "rimraf snow-monkey-forms.zip",
"zip:pack": "rsync -a --exclude='/vendor' --exclude='/node_modules' --exclude='.*' --exclude='*.config.js' --exclude='*.xml.dist' --exclude='/tests' --exclude='package*.json' . snow-monkey-forms && wp-env start && npm run composer install -- --no-dev -d snow-monkey-forms",
"zip:archive": "zip -9 -qmr snow-monkey-forms.zip snow-monkey-forms",
"zip": "npm run clean:zip && npm run zip:pack && npm run zip:archive",
"make-pot": "npm run wp i18n -- make-pot . ./languages/snow-monkey-forms.pot",
"make-json": "rimraf languages/*.json && npm run wp -- i18n make-json ./languages/snow-monkey-forms-ja.po --no-purge",
"make-php": "npm run cli php -- wp-content/plugins/snow-monkey-forms/bin/l10n.php",
"browsersync": "browser-sync start -p 'localhost:8888' -f '**/*' 'dist/**'"
}
}