Skip to content

Commit

Permalink
Merge branch 'master' into feature/html-input-view-ux-vol02
Browse files Browse the repository at this point in the history
  • Loading branch information
etoledom committed Sep 10, 2018
2 parents 2c38845 + fb6d1f3 commit 5e3c1d1
Show file tree
Hide file tree
Showing 44 changed files with 1,011 additions and 231 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
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
; ignore the submodules
gutenberg
react-native-aztec

8 changes: 3 additions & 5 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ 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/data' -> '<PROJECT_ROOT>/gutenberg/packages/data'
module.name_mapper='@wordpress/element' -> '<PROJECT_ROOT>/gutenberg/packages/element'
module.name_mapper='@wordpress/deprecated' -> '<PROJECT_ROOT>/gutenberg/packages/deprecated'
module.name_mapper='@wordpress/redux-routine' -> '<PROJECT_ROOT>/gutenberg/packages/redux-routine'
module.name_mapper='@wordpress/element' -> '<PROJECT_ROOT>/gutenberg/packages/element/src'
module.name_mapper='@wordpress/components' -> '<PROJECT_ROOT>/gutenberg/packages/components/src'

; mock/ignore style files
module.name_mapper='.*\(.scss\)' -> 'empty/object'
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"gcazaciuc.vscode-flow-ide"
"gcazaciuc.vscode-flow-ide",
"vsmobile.vscode-react-native"
]
}
34 changes: 34 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Attach to packager",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "attach",
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
]
}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ which will attempt to open your app in the iOS Simulator if you're on a Mac and

Some times, and especially when tweaking anything in the `package.json`, Babel configuration (`.babelrc`) or the Jest configuration (`jest.config.js`), your changes might seem to not take effect as expected. On those times, you might need to clean various caches before starting the packager. To do that, run the script: `yarn start:reset`. Other times, you might want to reinstall the NPM packages from scratch and the `yarn clean:install` script can be handy.

## Developing with Visual Studio Code

Although you're not required to use Visual Studio Code for developing gutenberg-mobile, it is the recommended IDE and we have some configuration for it.

When you first open the project in Visual Studio, you will be prompted to install some recommended extensions. This will help with some things like type checking and debugging.

![Prompt to install recommended extensions](images/recommended-extensions.png)

One of the extensions we are using is the [React Native Tools](https://marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native). This allows you to run the packager from VSCode or launch the application on iOS or Android. It also adds some debug configurations so you can set breakpoints and debug the application directly from VSCode. Take a look at the [extension documentation](https://marketplace.visualstudio.com/items?itemName=vsmobile.vscode-react-native) for more details.

## Test

Use the following command to run the test suite:
Expand Down
3 changes: 2 additions & 1 deletion __mocks__/nodejsMock.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @format */
/** @flow
* @format */

module.exports = {};
3 changes: 2 additions & 1 deletion __mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @format */
/** @flow
* @format */

module.exports = {};
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ repositories {
}

dependencies {
implementation project(':react-native-svg')
implementation project(':react-native-aztec')
implementation project(':react-native-recyclerview-list')
// compile fileTree(dir: "libs", include: ["*.jar"])
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/java/com/gutenberg/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.horcrux.svg.SvgPackage;
import org.wordpress.mobile.ReactNativeAztec.ReactAztecPackage;
import com.github.godness84.RNRecyclerViewList.RNRecyclerviewListPackage;
import com.facebook.react.ReactNativeHost;
Expand All @@ -25,6 +26,7 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new SvgPackage(),
new ReactAztecPackage(),
new RNRecyclerviewListPackage()
);
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ buildscript {
gradlePluginVersion = '3.0.1'
kotlinVersion = '1.2.31'
supportLibVersion = '27.1.1'
tagSoupVersion = '1.2.1'
tagSoupVersion = '1.2.2'
glideVersion = '3.7.0'
picassoVersion = '2.5.2'
robolectricVersion = '3.5.1'
jUnitVersion = '4.12'
jSoupVersion = '1.10.3'
wordpressUtilsVersion = '1.20.2'
wordpressUtilsVersion = '1.22'
espressoVersion = '3.0.1'
}

Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'gutenberg'
include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':react-native-aztec'
project(':react-native-aztec').projectDir = new File(rootProject.projectDir, '../react-native-aztec/android')
include ':react-native-recyclerview-list'
Expand Down
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 806 files
Binary file added images/recommended-extensions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @format */
/** @flow
* @format */

import { AppRegistry } from 'react-native';
import App from './src/app/App';
Expand Down
Loading

0 comments on commit 5e3c1d1

Please sign in to comment.