-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpackage.json
53 lines (53 loc) · 3.44 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
{
"license": "GPL-2.0-or-later",
"version": "1.13.14",
"devDependencies": {
"@larscom/cpx": "^2.0.0",
"csso-cli": "^3.0.0",
"node-wp-i18n": "^1.0.2",
"renamer": "^2.0.1",
"rexreplace": "^6.0.14",
"uglify-js": "^3.11.5"
},
"scripts": {
"env": "env",
"composer": "composer",
"install:dev": "composer install && yarn install",
"install:docker:test-support": "./tools/install-wp-tests.sh wp_test root root mysql",
"upgrade:docker:test-support": "./tools/install-wp-tests.sh wp_test root root mysql nightly true",
"start:docker": "docker-compose -f docker-dev/docker-compose.yml up",
"version": "yarn run update-version && git diff",
"update-version": "yarn update-version:header && yarn update-version:constant && yarn update-version:readme",
"update-version:header": "rexreplace \"^Version: .+\\..+\\..+\" \"Version: $npm_package_version\" geo-mashup.php",
"update-version:constant": "rexreplace \"'GEO_MASHUP_VERSION', '.+\\..+\\..+'\" \"'GEO_MASHUP_VERSION', '$npm_package_version'\" geo-mashup.php",
"update-version:readme": "rexreplace \"Stable tag: .+\\..+\\..+\" \"Stable tag: $npm_package_version\" readme.txt",
"premakepot": "yarn run clean",
"makepot": "wpi18n makepot --exclude \"vendor/.*\"",
"clean": "rm -rf dist/* deploy/*",
"test": "composer test",
"prebuild": "composer install --no-dev && yarn install && yarn run clean",
"build": "yarn build:php && yarn build:css && yarn build:js && yarn build:lang && yarn build:docs && yarn build:media",
"build:php": "cpx \"*.php\" dist && cpx \"php/**\" dist/php && yarn build:php-templates && yarn build:php-vendor",
"build:php-templates": "cpx \"default-templates/**\" dist/default-templates",
"build:php-vendor": "cpx \"vendor/**\" dist/vendor",
"build:lang": "cpx \"lang/*\" dist/lang",
"build:docs": "cpx \"readme.txt\" dist",
"build:css": "yarn build:css:min && yarn build:css:full",
"build:css:min": "cpx \"css/*.css\" dist/css -c \"csso\" && renamer --find '.css' --replace '.min.css' 'dist/css/*.css'",
"build:css:full": "cpx \"css/*.css\" dist/css",
"build:js": "yarn build:js:min && yarn build:js:full",
"build:js:min": "cpx \"js/**/*.js\" dist/js -c \"uglifyjs\" && renamer --find '.js' --replace '.min.js' 'dist/js/**/*.js'",
"build:js:full": "cpx \"js/**/*.js\" dist/js",
"build:media": "cpx \"images/**\" dist/images",
"postbuild": "composer install",
"deploy": "yarn deploy:checkout && yarn deploy:copy && yarn deploy:update",
"deploy:checkout": "svn checkout http://plugins.svn.wordpress.org/geo-mashup/trunk deploy",
"deploy:copy": "rm -rf \"deploy/*.*\" && cpx \"dist/**\" deploy",
"deploy:update": "yarn deploy:update:add && yarn deploy:update:rm && yarn deploy:update:commit && yarn deploy:update:tag",
"deploy:update:add": "svn stat deploy | grep '^?' | awk '{print $2}' | xargs -r svn add",
"deploy:update:rm": "svn stat deploy | grep '^!' | awk '{print $2}' | xargs -r svn rm",
"deploy:update:commit": "svn commit deploy -m \"deploy from build of $npm_package_version\" --no-auth-cache --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\"",
"deploy:update:tag": "svn copy \"http://plugins.svn.wordpress.org/geo-mashup/trunk\" \"http://plugins.svn.wordpress.org/geo-mashup/tags/$npm_package_version\" -m \"Tagging $npm_package_version\" --no-auth-cache --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\"",
"deploy:clean": "rm -rf deploy"
}
}