Skip to content

Commit

Permalink
Merge branch 'master' into rnmobile/fix-video-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
pinarol committed Jul 3, 2019
2 parents 4a3e351 + 9052d4c commit a4eec97
Show file tree
Hide file tree
Showing 71 changed files with 800 additions and 357 deletions.
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Documentation
/docs @youknowriad @chrisvanpatten @ajitbohra @notnownikki
/docs/designers-developers/developers @youknowriad @gziolo @chrisvanpatten @mkaz @ajitbohra @notnownikki
/docs/designers-developers/designers @youknowriad @chrisvanpatten @mkaz @ajitbohra @notnownikki
/docs @youknowriad @chrisvanpatten @ajitbohra
/docs/designers-developers/developers @youknowriad @gziolo @chrisvanpatten @mkaz @ajitbohra
/docs/designers-developers/designers @youknowriad @chrisvanpatten @mkaz @ajitbohra

# Data
/packages/api-fetch @youknowriad @aduth @nerrad @mmtr
Expand All @@ -10,7 +10,7 @@
/packages/redux-routine @youknowriad @aduth @nerrad

# Blocks
/packages/block-library @youknowriad @gziolo @Soean @ajitbohra @jorgefilipecosta @talldan @notnownikki
/packages/block-library @youknowriad @gziolo @Soean @ajitbohra @jorgefilipecosta @talldan

# Editor
/packages/annotations @youknowriad @aduth @atimmer @ellatrix
Expand All @@ -29,7 +29,7 @@

# Tooling
/bin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
/docs/tool @youknowriad @gziolo @chrisvanpatten @ajitbohra @nosolosw @notnownikki
/docs/tool @youknowriad @gziolo @chrisvanpatten @ajitbohra @nosolosw
/packages/babel-plugin-import-jsx-pragma @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
/packages/babel-plugin-makepot @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
- [ ] My code follows the WordPress code style. <!-- Check code: `npm run lint`, Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/ -->
- [ ] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->
- [ ] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->
- [ ] I've included developer documentation if appropriate. <!-- Handbook: https://wordpress.org/gutenberg/handbook/designers-developers/ -->
- [ ] I've included developer documentation if appropriate. <!-- Handbook: https://developer.wordpress.org/block-editor/ -->
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,16 @@ jobs:
env: WP_VERSION=latest SWITCH_TO_PHP=5.2
script:
- ./bin/run-wp-unit-tests.sh

before_deploy:
- npm install
- npm run playground:build -- --public-url '/gutenberg'

deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
local_dir: playground/dist
on:
branch: master
41 changes: 40 additions & 1 deletion bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,43 @@ function createStyleEntryTransform() {
} );
}

/**
* Returns a stream transform which maps an individual block.json to the
* index.js that imports it. Presently, babel resolves the import of json
* files by inlining them as a JavaScript primitive in the importing file.
* This transform ensures the importing file is rebuilt.
*
* @return {Transform} Stream transform instance.
*/
function createBlockJsonEntryTransform() {
const blocks = new Set;

return new Transform( {
objectMode: true,
async transform( file, encoding, callback ) {
const matches = /block-library[\/\\]src[\/\\](.*)[\/\\]block.json$/.exec( file );
const blockName = matches ? matches[ 1 ] : undefined;

// Only block.json files in the block-library folder are subject to this transform.
if ( ! blockName ) {
this.push( file );
callback();
return;
}

// Only operate once per block, assuming entries are common.
if ( blockName && blocks.has( blockName ) ) {
callback();
return;
}

blocks.add( blockName );
this.push( file.replace( 'block.json', 'index.js' ) );
callback();
},
} );
}

let onFileComplete = () => {};

let stream;
Expand All @@ -72,7 +109,9 @@ if ( files.length ) {
stream = new Readable( { encoding: 'utf8' } );
files.forEach( ( file ) => stream.push( file ) );
stream.push( null );
stream = stream.pipe( createStyleEntryTransform() );
stream = stream
.pipe( createStyleEntryTransform() )
.pipe( createBlockJsonEntryTransform() );
} else {
const bar = new ProgressBar( 'Build Progress: [:bar] :percent', {
width: 30,
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"issues": "https://github.com/WordPress/gutenberg/issues"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
"squizlabs/php_codesniffer": "^3.1",
"wimg/php-compatibility": "^8",
"wp-coding-standards/wpcs": "^1.0.0"
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"squizlabs/php_codesniffer": "^3.4.2",
"phpcompatibility/php-compatibility": "^9.2.0",
"wp-coding-standards/wpcs": "^2.1.1"
},
"require": {
"composer/installers": "~1.0"
Expand Down
Loading

0 comments on commit a4eec97

Please sign in to comment.