Skip to content

Commit

Permalink
Merge branch 'master' into feature/upgrade-to-rn-0553
Browse files Browse the repository at this point in the history
  • Loading branch information
hypest committed Jun 25, 2018
2 parents 125a7de + 27a517d commit 0e87597
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
9 changes: 4 additions & 5 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
[
"module-resolver",
{
"cwd": "babelrc",
"alias": {
"@wordpress/blocks": "./gutenberg/blocks",
"@wordpress/editor": "./gutenberg/editor",
"@wordpress/element": "./gutenberg/element",
"@wordpress/hooks": "./wordpress/hooks",
"@wordpress/utils": "./gutenberg/utils",
"@wordpress/blocks": "./blocks",
"@wordpress/editor": "./editor",
"@wordpress/element": "./element",
"@gutenberg": "./gutenberg"
},
"extensions": [
Expand Down
1 change: 0 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ munge_underscores=true
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
module.name_mapper='@gutenberg' -> '<PROJECT_ROOT>/gutenberg'
module.name_mapper='@wordpress/element' -> '<PROJECT_ROOT>/gutenberg/element'
module.name_mapper='@wordpress/utils' -> '<PROJECT_ROOT>/gutenberg/utils'

; mock/ignore style files
module.name_mapper='.*\(.scss\)' -> 'empty/object'
Expand Down
6 changes: 1 addition & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ module.exports = {
'node',
],
moduleNameMapper: {
'@wordpress/blocks': '<rootDir>/gutenberg/blocks',
'@wordpress/editor': '<rootDir>/gutenberg/editor',
'@wordpress/element': '<rootDir>/gutenberg/element',
'@wordpress/hooks': '<rootDir>/wordpress/hooks',
'@wordpress/utils': '<rootDir>/gutenberg/utils',
'@wordpress\\/(blocks|editor|element)$': '<rootDir>/gutenberg/$1',
'@gutenberg': '<rootDir>/gutenberg',

// Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"lint:fix": "eslint $npm_package_config_jsfiles --fix"
},
"dependencies": {
"@wordpress/hooks": "^1.2.0",
"@wordpress/i18n": "^1.1.0",
"@wordpress/is-shallow-equal": "^1.0.1",
"babel-plugin-module-resolver": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion sass-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if ( reactNativeMinorVersion >= 52 ) {
}

// TODO: need to find a way to pass the include paths and the default asset files via some config
const autoImportIncludePaths = [ 'gutenberg/edit-post/assets/stylesheets' ];
const autoImportIncludePaths = [ path.join( path.dirname( __filename ), 'gutenberg/edit-post/assets/stylesheets' ) ];
const autoImportAssets = [
'_colors.scss',
'_admin-schemes.scss',
Expand Down
2 changes: 1 addition & 1 deletion src/app/globals.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @format */

import { createElement } from '@wordpress/element';
import { createElement } from '@gutenberg/element';

global.wp = {
element: {
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,10 @@
version "2.1.4"
resolved "https://registry.yarnpkg.com/@wordpress/browserslist-config/-/browserslist-config-2.1.4.tgz#2297713d53424dec835eed4895abd4ceb3cac297"

"@wordpress/hooks@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@wordpress/hooks/-/hooks-1.2.0.tgz#258196ca9c59a08b28faf759706ab409b12674c9"

"@wordpress/i18n@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@wordpress/i18n/-/i18n-1.1.1.tgz#e97c31879e1f76878cfdd14eb7d7a0ec99a234c3"
Expand Down

0 comments on commit 0e87597

Please sign in to comment.