Skip to content

Commit

Permalink
Merge pull request #7805 from WordPress/add-packages
Browse files Browse the repository at this point in the history
Packages: Move packages repository into Gutenberg (2nd try)
  • Loading branch information
gziolo committed Jul 9, 2018
2 parents a5de0b6 + 998d288 commit 921e9d8
Show file tree
Hide file tree
Showing 158 changed files with 8,550 additions and 856 deletions.
12 changes: 2 additions & 10 deletions bin/packages/get-babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,17 @@
* External dependencies
*/
const { isArray, map } = require( 'lodash' );
const babelPluginTransformReactJSX = require( 'babel-plugin-transform-react-jsx' );
const babelPresetEnv = require( 'babel-preset-env' );

/**
* WordPress dependencies
*/
const babelDefaultConfig = require( '@wordpress/babel-preset-default' );

const plugins = map( babelDefaultConfig.plugins, ( plugin ) => {
if ( isArray( plugin ) && plugin[ 0 ] === babelPluginTransformReactJSX ) {
// TODO: It should become the default value when all modules are moved to packages.
return [ babelPluginTransformReactJSX, { pragma: 'createElement' } ];
}

return plugin;
} );
const plugins = babelDefaultConfig.plugins;

if ( ! process.env.SKIP_JSX_PRAGMA_TRANSFORM ) {
plugins.push( [ require( '../../packages/babel-plugin-import-jsx-pragma' ).default, {
plugins.push( [ require( '@wordpress/babel-plugin-import-jsx-pragma' ).default, {
scopeVariable: 'createElement',
source: '@wordpress/element',
isDefault: false,
Expand Down
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ coverage:
patch: off

comment: false

ignore:
- "packages/is-shallow-equal/benchmark/*"

7 changes: 5 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"lerna": "2.11.0",
"commands": {
"command": {
"publish": {
"message": "chore(release): publish"
}
},
"ignoreChanges": [
"**/benchmark/*.js",
"**/test/**"
],
"packages": [
"packages/*"
],
Expand Down
Loading

0 comments on commit 921e9d8

Please sign in to comment.