Skip to content

Commit 6adc18f

Browse files
committed
chore: style
1 parent a540c75 commit 6adc18f

File tree

9 files changed

+48
-37
lines changed

9 files changed

+48
-37
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
11
# Contibution guidelines
22

3-
This document is intended for developers interest in making contributions to Preact and document our internal processes like releasing a new version
3+
This document is intended for developers interest in making contributions to
4+
Preact and document our internal processes like releasing a new version
45

56
## Getting Started
67

7-
This steps will help you to set up your development environment. That includes all dependencies we use to build Preact and developer tooling like git commit hooks.
8+
This steps will help you to set up your development environment. That includes
9+
all dependencies we use to build Preact and developer tooling like git commit
10+
hooks.
811

9-
1. Clone the git repository: `git clone [email protected]:barelyhuman/preact-native.git`
12+
1. Clone the git repository:
13+
`git clone [email protected]:barelyhuman/preact-native.git`
1014
2. Go into the cloned folder: `cd preact-native/`
1115
3. Install all dependencies: `yarn install`
1216

13-
## Testing
17+
## Testing
1418

15-
Once We're sure of the direction of this project, the codebase will include tests instead of the simulator method to check the result of the changes.
16-
There's scripts in place for running the simulators for both `ios` and `android`
19+
Once We're sure of the direction of this project, the codebase will include
20+
tests instead of the simulator method to check the result of the changes.
21+
There's scripts in place for running the simulators for both `ios` and `android`
1722

1823
1. Run the metro bundler: `yarn example:start`
1924
2. Run the android version: `yarn example:android`
2025
3. Run the ios version: `yarn example:ios`
2126

22-
A little experience with react native is expected to deal with react native setup issues, if there's anything you wish for me to help you out with, do reach out over on [Telegram](http://barelyreaper.t.me) | [Mail](mailto:[email protected]) | [Twitter](https://twitter.com/barelyreaper)
27+
A little experience with react native is expected to deal with react native
28+
setup issues, if there's anything you wish for me to help you out with, do reach
29+
out over on [Telegram](http://barelyreaper.t.me) |
30+
[Mail](mailto:[email protected]) |
31+
[Twitter](https://twitter.com/barelyreaper)
2332

2433
## Submitting Patches
2534

26-
> **Note**: If working on a PR that's an issue make sure you check with the maintainers if someone is already working on the issue.
35+
> **Note**: If working on a PR that's an issue make sure you check with the
36+
> maintainers if someone is already working on the issue.
2737
2838
- Make changes and submit a PR
2939
- Modify change according to feedback (if there is any)

dom/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export * from "./dom"
2-
export * from "./register-native-dom"
1+
export * from './dom'
2+
export * from './register-native-dom'

example/.watchmanconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

example/__tests__/App-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* @format
33
*/
44

5-
import 'react-native';
6-
import React from 'react';
7-
import App from '../App';
5+
import 'react-native'
6+
import React from 'react'
7+
import App from '../App'
88

99
// Note: test renderer must be required after react-native.
10-
import renderer from 'react-test-renderer';
10+
import renderer from 'react-test-renderer'
1111

1212
it('renders correctly', () => {
13-
renderer.create(<App />);
14-
});
13+
renderer.create(<App />)
14+
})

example/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "Example",
33
"displayName": "Example"
4-
}
4+
}

example/babel.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const path = require('path');
2-
const pak = require('../package.json');
1+
const path = require('path')
2+
const pak = require('../package.json')
33

44
module.exports = {
55
presets: ['module:metro-react-native-babel-preset'],
@@ -14,4 +14,4 @@ module.exports = {
1414
},
1515
],
1616
],
17-
};
17+
}

example/metro.config.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
const path = require('path');
2-
const escape = require('escape-string-regexp');
3-
const exclusionList = require('metro-config/src/defaults/exclusionList');
4-
const pak = require('../package.json');
1+
const path = require('path')
2+
const escape = require('escape-string-regexp')
3+
const exclusionList = require('metro-config/src/defaults/exclusionList')
4+
const pak = require('../package.json')
55

6-
const root = path.resolve(__dirname, '..');
6+
const root = path.resolve(__dirname, '..')
77

88
const modules = Object.keys({
99
...pak.peerDependencies,
10-
});
10+
})
1111

1212
module.exports = {
1313
projectRoot: __dirname,
@@ -18,14 +18,13 @@ module.exports = {
1818
resolver: {
1919
blacklistRE: exclusionList(
2020
modules.map(
21-
(m) =>
22-
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
21+
m => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
2322
)
2423
),
2524

2625
extraNodeModules: modules.reduce((acc, name) => {
27-
acc[name] = path.join(__dirname, 'node_modules', name);
28-
return acc;
26+
acc[name] = path.join(__dirname, 'node_modules', name)
27+
return acc
2928
}, {}),
3029
},
3130

@@ -37,4 +36,4 @@ module.exports = {
3736
},
3837
}),
3938
},
40-
};
39+
}

example/react-native.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const path = require('path');
1+
const path = require('path')
22

33
module.exports = {
44
dependencies: {
55
'@barelyhuman/preact-native': {
66
root: path.join(__dirname, '..'),
77
},
88
},
9-
};
9+
}

readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,16 @@ export default App
6767
- [x] A minimal dom
6868
- [ ] Create views from the bridge instead of rendering with react
6969
- [x] Create native views (Views created on the iOS and Android platform APIs)
70-
- [ ] Create derived views (Views created on top of the above by manipulating the SDK)
70+
- [ ] Create derived views (Views created on top of the above by manipulating
71+
the SDK)
7172
- [x] Update view styles from the bridge
7273
- [x] Update text nodes from the bridge
7374
- [ ] Add compat for preact to make it possible for preact to diff and render
7475
without the need for a react tree generator
7576
`import {render} from "preact-native/dom"`
76-
- [ ] Handle events (presses, input, gestures) , aka events from preact will be on the DOM, need to be proxied as events to the Native SDK
77-
- [ ] Handling for Bridge level style props
77+
- [ ] Handle events (presses, input, gestures) , aka events from preact will be
78+
on the DOM, need to be proxied as events to the Native SDK
79+
- [ ] Handling for Bridge level style props
7880

7981
## Contribute
8082

0 commit comments

Comments
 (0)