Skip to content

Commit

Permalink
Merge pull request #120 from wordpress-mobile/feature/lose-babel-modu…
Browse files Browse the repository at this point in the history
…le-resolver

Remove the babel module resolver
  • Loading branch information
hypest committed Aug 16, 2018
2 parents 33d9f6c + 44d5974 commit 2436754
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 51 deletions.
15 changes: 0 additions & 15 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
],
"plugins": [
"react-require",
[
"module-resolver",
{
"cwd": "babelrc",
"alias": {
"@gutenberg": "./gutenberg"
},
"extensions": [
".js",
".native.js",
".ios.js",
".android.js"
]
}
],
"transform-async-to-generator",
"transform-async-generator-functions",
"react-native-classname-to-style",
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.file_ext=.scss
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/block-library' -> '<PROJECT_ROOT>/gutenberg/packages/block-library/src'
module.name_mapper='@wordpress/blocks' -> '<PROJECT_ROOT>/gutenberg/packages/blocks/src'
module.name_mapper='@wordpress/element' -> '<PROJECT_ROOT>/gutenberg/packages/element/src'

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if ( process.env.TEST_RN_PLATFORM ) {
}

module.exports = {
verbose: true,
preset: 'jest-react-native',
testEnvironment: 'jsdom',
testPathIgnorePatterns: [ '/node_modules/', '/gutenberg/' ],
Expand All @@ -32,7 +33,6 @@ module.exports = {
],
moduleNameMapper: {
'@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library)$': '<rootDir>/gutenberg/packages/$1/src/index',
'@gutenberg': '<rootDir>/gutenberg',

// Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets
'\\.(scss)$': '<rootDir>/__mocks__/styleMock.js',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
"@wordpress/hooks": "^1.2.1",
"@wordpress/i18n": "^1.1.0",
"@wordpress/is-shallow-equal": "^1.0.1",
"babel-plugin-module-resolver": "^3.1.0",
"babel-preset-es2015": "^6.24.1",
"classnames": "^2.2.5",
"dom-react": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/parser/block-parser-code.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import '../globals';

import { registerCoreBlocks } from '@gutenberg/core-blocks';
import { registerCoreBlocks } from '@wordpress/block-library';
import { parse } from '@wordpress/blocks';

registerCoreBlocks();
Expand Down
2 changes: 1 addition & 1 deletion src/parser/block-parser-more.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import '../globals';

import { registerCoreBlocks } from '@gutenberg/core-blocks';
import { registerCoreBlocks } from '@wordpress/block-library';
import { parse } from '@wordpress/blocks';

registerCoreBlocks();
Expand Down
2 changes: 1 addition & 1 deletion src/parser/block-parser-paragraph.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import '../globals';

import { registerCoreBlocks } from '@gutenberg/core-blocks';
import { registerCoreBlocks } from '@wordpress/block-library';
import { parse } from '@wordpress/blocks';

registerCoreBlocks();
Expand Down
2 changes: 1 addition & 1 deletion src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

// Gutenberg imports
import { registerCoreBlocks } from '@gutenberg/core-blocks';
import { registerCoreBlocks } from '@wordpress/block-library';
import { parse } from '@wordpress/blocks';

import { createStore } from 'redux';
Expand Down
2 changes: 1 addition & 1 deletion src/store/reducers/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import { reducer } from './';
import * as actions from '../actions/';
import { registerCoreBlocks } from '@gutenberg/core-blocks';
import { registerCoreBlocks } from '@wordpress/block-library';

describe( 'Store', () => {
describe( 'reducer', () => {
Expand Down
29 changes: 1 addition & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1149,16 +1149,6 @@ babel-plugin-jest-hoist@^22.4.4:
version "22.4.4"
resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.4.tgz#b9851906eab34c7bf6f8c895a2b08bea1a844c0b"

babel-plugin-module-resolver@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.1.1.tgz#881cf67e3d4b8400d5eaaefc1be44d2dc1fe404f"
dependencies:
find-babel-config "^1.1.0"
glob "^7.1.2"
pkg-up "^2.0.0"
reselect "^3.0.1"
resolve "^1.4.0"

babel-plugin-react-native-classname-to-style@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/babel-plugin-react-native-classname-to-style/-/babel-plugin-react-native-classname-to-style-1.2.1.tgz#364182bbc7d1929242a7a09598f873c5e97350dd"
Expand Down Expand Up @@ -3403,13 +3393,6 @@ finalhandler@1.1.0:
statuses "~1.3.1"
unpipe "~1.0.0"

find-babel-config@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.1.0.tgz#acc01043a6749fec34429be6b64f542ebb5d6355"
dependencies:
json5 "^0.5.1"
path-exists "^3.0.0"

find-cache-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f"
Expand Down Expand Up @@ -5969,12 +5952,6 @@ pkg-dir@^2.0.0:
dependencies:
find-up "^2.1.0"

pkg-up@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
dependencies:
find-up "^2.1.0"

plist@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/plist/-/plist-2.0.1.tgz#0a32ca9481b1c364e92e18dc55c876de9d01da8b"
Expand Down Expand Up @@ -6806,10 +6783,6 @@ requireindex@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef"

reselect@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/reselect/-/reselect-3.0.1.tgz#efdaa98ea7451324d092b2b2163a6a1d7a9a2147"

reserved-words@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1"
Expand All @@ -6836,7 +6809,7 @@ resolve@1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"

resolve@^1.3.2, resolve@^1.3.3, resolve@^1.4.0, resolve@^1.5.0:
resolve@^1.3.2, resolve@^1.3.3, resolve@^1.5.0:
version "1.8.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
dependencies:
Expand Down

0 comments on commit 2436754

Please sign in to comment.