Prep Plugin for release on WordPress.org (#23)
* Update translation text domain * Escape everything that should be escaped. * Add nonce checks where needed. * Sanitize all inputs. * Apply Code style changes across the codebase. * Correct many deprecation notices. * Optimize load order of many filters. * Add Proper Build script * Use emojii flags * Fix i18n deprecation notice for translating too early * Put all scripts in footer and load async
This commit is contained in:
29
package.json
Normal file
29
package.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "wp-multisite-waas",
|
||||
"title": "WP Multisite WaaS",
|
||||
"homepage": "https://wpmultisitewaas.org/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/superdav/wp-multisite-waas.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"clean-css-cli": "^5.6.3",
|
||||
"uglify-js": "^3.19.3"
|
||||
},
|
||||
"config": {
|
||||
"translate": true
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "composer install --no-dev",
|
||||
"prebuild:dev": "composer install",
|
||||
"build": "npm run uglify && npm run makepot && npm run cleancss && npm run archive",
|
||||
"build:dev": "npm run uglify && npm run makepot && npm run cleancss",
|
||||
"archive": "composer archive --file=$npm_package_name --format=zip",
|
||||
"postarchive": "rm -rf $npm_package_name && unzip $npm_package_name.zip -d $npm_package_name && rm $npm_package_name.zip && zip -r $npm_package_name.zip $npm_package_name && rm -rf $npm_package_name",
|
||||
"preuglify": "rm -f assets/js/*.min.js",
|
||||
"uglify": "for f in assets/js/*.js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
|
||||
"precleancss": "rm -f assets/css/*.min.css",
|
||||
"cleancss": "for f in assets/css/*.css; do file=${f%.css}; node_modules/.bin/cleancss -o $file.min.css $f; done",
|
||||
"makepot": "wp i18n make-pot ./ lang/$npm_package_name.pot --exclude=node_modules,tests,docs,assets/js/lib"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user