mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Make plugin releasable via woorelease (#83)
This commit is contained in:
parent
9c1d51ca62
commit
a5222943fd
3 changed files with 24 additions and 18 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,8 +1,9 @@
|
||||||
/vendor/
|
/vendor/
|
||||||
/build/
|
/build/
|
||||||
node_modules
|
node_modules
|
||||||
phpunit.xml
|
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
composer.lock
|
composer.lock
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
modules/ppcp-button/assets/*
|
modules/ppcp-button/assets/*
|
||||||
|
.idea/
|
||||||
|
*.zip
|
||||||
|
|
10
README.md
10
README.md
|
@ -13,7 +13,7 @@ PayPal's latest complete payments processing solution. Accept PayPal, PayPal Cre
|
||||||
1. Clone repository
|
1. Clone repository
|
||||||
2. `$ cd woocommerce-paypal-payments`
|
2. `$ cd woocommerce-paypal-payments`
|
||||||
3. `$ composer install`
|
3. `$ composer install`
|
||||||
4. `$ yarn run dev`
|
4. `$ yarn run build:dev`
|
||||||
5. Change the `PAYPAL_INTEGRATION_DATE` constant to `gmdate( 'Y-m-d' )` to run the latest PayPal JavaScript SDK
|
5. Change the `PAYPAL_INTEGRATION_DATE` constant to `gmdate( 'Y-m-d' )` to run the latest PayPal JavaScript SDK
|
||||||
|
|
||||||
Note: PHPUnit needs at least PHP 7.3.
|
Note: PHPUnit needs at least PHP 7.3.
|
||||||
|
@ -34,12 +34,10 @@ Clone the repository and `cd` into it
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
Build the plugin and remove unnecessary files:
|
The following command should get you a ZIP file ready to be used on a WordPress site.
|
||||||
|
|
||||||
```
|
```
|
||||||
composer install --no-dev
|
npm run build
|
||||||
yarn run build
|
|
||||||
rm -rf ./{tests,.git,.github,.gitignore,.travis.yml,composer.json,composer.lock,package.json,phpcs.xml.dist,phpunit.xml.dist,.phpunit.result.cache,yarn.lock}
|
|
||||||
rm -rf ./modules/ppcp-button/{node_modules/,.babelrc,package.json,webpack.config.js,yarn.lock}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Update version
|
### Update version
|
||||||
|
|
29
package.json
29
package.json
|
@ -1,19 +1,26 @@
|
||||||
{
|
{
|
||||||
"name": "izettle-woocommerce",
|
"name": "woocommerce-paypal-payments",
|
||||||
"version": "0.1.0",
|
"version": "1.0.0",
|
||||||
"description": "iZettle WooCommerce",
|
"description": "WooCommerce PayPal Payments",
|
||||||
"repository": "https://github.com/inpsyde/izettle-woocommerce",
|
"repository": "https://github.com/woocommerce/woocommerce-paypal-payments",
|
||||||
"license": "GPL-2.0",
|
"license": "GPL-2.0",
|
||||||
"author": "Inpsyde GmbH",
|
"author": "WooCommerce",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install:assets:ppcp-button": "cd modules/ppcp-button && yarn install",
|
"install:modules:ppcp-button": "cd modules/ppcp-button && yarn install",
|
||||||
"install:assets": "yarn run install:assets:ppcp-button",
|
"install:modules": "yarn run install:modules:ppcp-button",
|
||||||
"build:assets:ppcp-button": "cd modules/ppcp-button && yarn run build",
|
"build:modules:ppcp-button": "cd modules/ppcp-button && yarn run build",
|
||||||
"build:assets": "yarn run build:assets:ppcp-button",
|
"build:modules": "yarn run build:modules:ppcp-button",
|
||||||
"build": "yarn run install:assets && yarn run build:assets"
|
"build:dev": "yarn run install:modules && yarn run build:modules",
|
||||||
|
|
||||||
|
"prebuild": "rm -rf ./vendor",
|
||||||
|
"build": "composer install --no-dev && npm run build:dev && npm run archive",
|
||||||
|
"prearchive": "rm -rf $npm_package_name.zip",
|
||||||
|
"archive": "composer archive --file=$npm_package_name --format=zip && npm run archive:cleanup",
|
||||||
|
"archive:cleanup": "zip -d $npm_package_name.zip tests/\\* .github/\\* wordpress_org_assets/\\* modules/ppcp-button/node_modules/\\* \\*.DS_Store README.md .gitattributes .gitignore .travis.yml composer.json composer.lock package.json yarn.lock phpunit.xml.dist .phpunit.result.cache phpcs.xml.dist modules/ppcp-button/.babelrc modules/ppcp-button/package.json modules/ppcp-button/webpack.config.js modules/ppcp-button/yarn.lock vendor/\\*/.idea/\\* vendor/\\*/.gitignore vendor/\\*/.gitattributes vendor/\\*/.travis.yml",
|
||||||
|
"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"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue