Add pre-publishing script and bump version to 2.0.0-rc1 (https://github.com/woocommerce/woocommerce-blocks/pull/494)

* Add a `prepack` script to run before publish

This will re-install dependencies, run linting on PHP, CSS, and JS, run the JS tests, and lastly build the production bundle.

* phpcs is now part of `npm run lint` so we don’t need to run it twice

* Version bump to RC1
This commit is contained in:
Kelly Dwan 2019-03-15 12:55:34 -04:00 committed by GitHub
parent d2f1aa6c44
commit 0c85ec1bc7
4 changed files with 7 additions and 6 deletions

View File

@ -22,7 +22,6 @@ jobs:
php: 7.1
script:
- composer install
- composer run-script phpcs .
- npm install
- npm run lint
- npm run build

View File

@ -1,6 +1,6 @@
{
"name": "@woocommerce/block-library",
"version": "2.0.0-beta",
"version": "2.0.0-rc1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -2,7 +2,7 @@
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
"version": "2.0.0-beta",
"version": "2.0.0-rc1",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
@ -16,9 +16,11 @@
},
"license": "GPL-3.0+",
"scripts": {
"prepack": "npm install && npm run lint && npm run test && npm run build",
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
"start": "cross-env BABEL_ENV=default webpack --watch",
"lint": "npm run lint:css && npm run lint:js",
"lint": "npm run lint:php && npm run lint:css && npm run lint:js",
"lint:php": "composer run-script phpcs .",
"lint:css": "stylelint assets/css",
"lint:js": "eslint assets/js --ext=js,jsx",
"test": "wp-scripts test-unit-js --config tests/js/jest.config.json",

View File

@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Blocks
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
* Description: WooCommerce blocks for the Gutenberg editor.
* Version: 2.0.0-beta
* Version: 2.0.0-rc1
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
@ -15,7 +15,7 @@
defined( 'ABSPATH' ) || die();
define( 'WGPB_VERSION', '2.0.0-beta' );
define( 'WGPB_VERSION', '2.0.0-rc1' );
define( 'WGPB_PLUGIN_FILE', __FILE__ );
define( 'WGPB_ABSPATH', dirname( WGPB_PLUGIN_FILE ) . '/' );