Skip to content

Commit

Permalink
Monorepo experiment, add main native packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tug committed Sep 16, 2019
1 parent 4f115c7 commit 2bf7561
Show file tree
Hide file tree
Showing 290 changed files with 35,133 additions and 12,459 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build-module
node_modules
packages/block-serialization-spec-parser/parser.js
packages/e2e-tests/plugins
packages/react-native-*
playground/dist
vendor
wordpress
Expand Down
28,688 changes: 16,268 additions & 12,420 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"@wordpress/nux": "file:packages/nux",
"@wordpress/plugins": "file:packages/plugins",
"@wordpress/priority-queue": "file:packages/priority-queue",
"@wordpress/react-native-aztec": "file:packages/react-native-aztec",
"@wordpress/react-native-e2e-tests": "file:packages/react-native-e2e-tests",
"@wordpress/react-native-gutenberg-bridge": "file:packages/react-native-gutenberg-bridge",
"@wordpress/react-native-gutenberg-editor": "file:packages/react-native-gutenberg-editor",
"@wordpress/redux-routine": "file:packages/redux-routine",
"@wordpress/rich-text": "file:packages/rich-text",
"@wordpress/server-side-render": "file:packages/server-side-render",
Expand Down Expand Up @@ -118,8 +122,6 @@
"lint-staged": "9.2.5",
"lodash": "4.17.14",
"make-dir": "3.0.0",
"metro-react-native-babel-preset": "0.55.0",
"metro-react-native-babel-transformer": "0.55.0",
"mkdirp": "0.5.1",
"node-sass": "4.12.0",
"node-watch": "0.6.0",
Expand All @@ -128,7 +130,6 @@
"progress": "2.0.3",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "0.60.0",
"react-test-renderer": "16.9.0",
"rimraf": "2.6.2",
"rtlcss": "2.4.0",
Expand Down Expand Up @@ -187,6 +188,7 @@
"predev": "npm run check-engines",
"dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"",
"dev:packages": "node ./bin/packages/watch.js",
"native": "npm run --prefix packages/react-native-gutenberg-editor",
"docs:build": "node ./docs/tool/index.js && node ./bin/update-readmes.js",
"fixtures:clean": "rimraf \"packages/e2e-tests/fixtures/blocks/*.+(json|serialized.html)\"",
"fixtures:server-registered": "wp-scripts env docker-run php ./bin/get-server-blocks.php > test/integration/full-content/server-registered.json",
Expand Down Expand Up @@ -217,7 +219,7 @@
"test-unit-php": "wp-scripts env test-php",
"test-unit-php-multisite": "cross-env WP_MULTISITE=1 wp-scripts env test-php",
"test-unit:native": "cd test/native/ && cross-env NODE_ENV=test jest --config ./jest.config.js",
"test-unit:native:debug": "cd test/native/ && node --inspect ../../node_modules/.bin/jest --runInBand --config ./jest.config.js",
"test-unit:native:debug": "cd test/native/ && node --inspect $(npm bin)/jest --runInBand --config ./jest.config.js",
"playground:build": "npm run build:packages && parcel build playground/src/index.html -d playground/dist",
"playground:start": "concurrently \"npm run dev:packages\" \"parcel playground/src/index.html -d playground/dist\"",
"preenv": "npm run check-engines",
Expand Down
3 changes: 2 additions & 1 deletion packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
"wordpress",
"wordpress",
"block directory"
],
"homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/block-directory/README.md",
Expand All @@ -19,6 +19,7 @@
},
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"dependencies": {
"@wordpress/api-fetch": "file:../api-fetch",
"@wordpress/block-editor": "file:../block-editor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* External dependencies
*/
import { FlatList, View, Text, TouchableHighlight } from 'react-native';
import { subscribeMediaAppend } from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -15,6 +14,7 @@ import {
import { withDispatch, withSelect } from '@wordpress/data';
import { withInstanceId, compose } from '@wordpress/compose';
import { BottomSheet, Icon } from '@wordpress/components';
import { subscribeMediaAppend } from '@wordpress/react-native-gutenberg-bridge';

/**
* Internal dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
* External dependencies
*/
import React from 'react';
import {
requestMediaPickFromMediaLibrary,
requestMediaPickFromDeviceLibrary,
requestMediaPickFromDeviceCamera,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { Picker } from '@wordpress/components';
import {
requestMediaPickFromMediaLibrary,
requestMediaPickFromDeviceLibrary,
requestMediaPickFromDeviceCamera,
} from '@wordpress/react-native-gutenberg-bridge';

export const MEDIA_TYPE_IMAGE = 'image';
export const MEDIA_TYPE_VIDEO = 'video';
Expand Down
12 changes: 6 additions & 6 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
*/
import React from 'react';
import { View, ImageBackground, Text, TouchableWithoutFeedback, Dimensions } from 'react-native';
import {
requestMediaImport,
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from 'react-native-gutenberg-bridge';
import { isEmpty } from 'lodash';

/**
Expand All @@ -31,6 +25,12 @@ import {
import { __, sprintf } from '@wordpress/i18n';
import { isURL } from '@wordpress/url';
import { doAction, hasAction } from '@wordpress/hooks';
import {
requestMediaImport,
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from '@wordpress/react-native-gutenberg-bridge';

/**
* Internal dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
*/
import React from 'react';
import { View } from 'react-native';
import {
subscribeMediaUpload,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -14,6 +11,9 @@ import {
Spinner,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import {
subscribeMediaUpload,
} from '@wordpress/react-native-gutenberg-bridge';

/**
* Internal dependencies
Expand Down
11 changes: 6 additions & 5 deletions packages/block-library/src/video/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
*/
import React from 'react';
import { View, TouchableWithoutFeedback, Text } from 'react-native';

/**
* Internal dependencies
*/
import Video from './video-player';
import {
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -32,6 +28,11 @@ import {
import { __ } from '@wordpress/i18n';
import { isURL } from '@wordpress/url';
import { doAction, hasAction } from '@wordpress/hooks';
import {
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from '@wordpress/react-native-gutenberg-bridge';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/components/layout/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { Platform, SafeAreaView, View } from 'react-native';
import SafeArea from 'react-native-safe-area';
import { sendNativeEditorDidLayout } from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -12,6 +11,7 @@ import { Component } from '@wordpress/element';
import { withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { HTMLTextInput, KeyboardAvoidingView, ReadableContentView } from '@wordpress/components';
import { sendNativeEditorDidLayout } from '@wordpress/react-native-gutenberg-bridge';

/**
* Internal dependencies
Expand Down
16 changes: 6 additions & 10 deletions packages/editor/src/components/provider/index.native.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
/**
* External dependencies
* WordPress dependencies
*/
import { Component } from '@wordpress/element';
import { parse, serialize, getUnregisteredTypeHandlerName } from '@wordpress/blocks';
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import RNReactNativeGutenbergBridge, {
subscribeParentGetHtml,
subscribeParentToggleHTMLMode,
subscribeUpdateHtml,
subscribeSetFocusOnTitle,
subscribeSetTitle,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
*/
import { Component } from '@wordpress/element';
import { parse, serialize, getUnregisteredTypeHandlerName } from '@wordpress/blocks';
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
} from '@wordpress/react-native-gutenberg-bridge';

/**
* Internal dependencies
Expand Down
118 changes: 118 additions & 0 deletions packages/react-native-aztec/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# OS X generated file
.DS_Store

# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/
build/

# Local configuration file (sdk path, etc)
local.properties

# Eclipse project files
.settings/
.classpath
.project

# Intellij project files
*.iml
*.ipr
*.iws
.idea/

# Gradle
.gradle/

# Generated by gradle
crashlytics.properties

# npm
node_modules/

# yarn
yarn-error.log

###
### Starting at this point, the Swift .gitignore rules from https://github.com/github/gitignore/blob/master/Swift.gitignore
###

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.

ios/Carthage
Carthage/Checkouts
Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

Loading

0 comments on commit 2bf7561

Please sign in to comment.