Skip to content

Commit

Permalink
fix(ci): release scripts fix, docs-publishing script add
Browse files Browse the repository at this point in the history
  • Loading branch information
32penkin authored and artyorsh committed Dec 3, 2019
1 parent bd17356 commit ea44bee
Show file tree
Hide file tree
Showing 213 changed files with 201,329 additions and 1,828 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ npm-debug.log
docs/docs.json
docs/src/input.json
docs/src/playground.json
docs/src/examples.json
docs/src/assets/playground-build/
docs/src/assets/examples-build/

# env
src/playground/env/index.js

#config
config/

.expo
dist
26 changes: 12 additions & 14 deletions DEV_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,17 @@ import { AwesomeComponentScreen } from '@pg/scenes/awesomeComponent/awesomeCompo
To start a new release (publish the framework packages on NPM) you need:

1. Create a new release branch with template `release/vX.X.X`
3. Run tests: `yarn release:validate`
2. Run tests: `npm run lint && npm run test`
3. MANUALLY update a version in main ./package.json to a new one
4. Generate documentation if needed: `yarn docs:start`
5. Generate changelog: `yarn release:changelog`
6. Fix/expand changelog manually
7. Update documentation (e.g [DEV_DOCS.md](./DEV_DOCS.md)) files if needed
8. Push the branch, create PR, approve - merge
9. Pull the upstream (master or another version branch (e.g. 4.0.1, next))
10. Run tests: `yarn release:validate`
11. Assemble build: `yarn release:prepare`
12. Publish the package to npm: `yarn release`
13. Create and push [git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) with template `(vX.X.X)`
14. Create release on GitHub for the tag
4. Generate changelog: `npm run bump-version`
5. Fix/expand changelog manually
6. Update documentation (e.g [DEV_DOCS.md](./DEV_DOCS.md)) files if needed
7. Push the branch, create PR, approve - merge
8. Pull the upstream (master or another version branch (e.g. 4.0.1, next))
9. Publish documentation: `npm run publish-docs`
10. Publish framework packages: `npm run publish-packages`
11. Create and push [git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) with template `(vX.X.X)`
12. Create release on GitHub for the tag

# Playground

Expand All @@ -258,7 +256,7 @@ git clone https://github.com/eva-design/eva
```
- Ensure you have the following structure of repos:
```
- /Users/KittenDeveloper/
- /Users/UIKittenDeveloper/
- react-native-ui-kitten
- eva
```
Expand Down Expand Up @@ -290,7 +288,7 @@ git clone https://github.com/eva-design/eva
```
- Ensure you have the following structure of repos:
```
- /Users/KittenDeveloper/
- /Users/UIKittenDeveloper/
- react-native-ui-kitten
- eva
- kittenTricks
Expand Down
Empty file added docs/3.1.4/3rdpartylicenses.txt
Empty file.
Binary file added docs/3.1.4/Roboto-Black.2a82f89b0a35ee7f9d45.eot
Binary file not shown.
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Black.44236ad507eddcbfd986.ttf
Binary file not shown.
Binary file not shown.
10,968 changes: 10,968 additions & 0 deletions docs/3.1.4/Roboto-Black.ab04c7611d94b690aee3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11,086 changes: 11,086 additions & 0 deletions docs/3.1.4/Roboto-BlackItalic.1f37c7545ae9f63d2279.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Bold.56a76a220d9c9765946d.ttf
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Bold.ab96cca26751239828b8.woff2
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Bold.ad140ff02a7091257e2b.woff
Binary file not shown.
11,010 changes: 11,010 additions & 0 deletions docs/3.1.4/Roboto-Bold.c7f4667b59b9bc95130e.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/3.1.4/Roboto-Bold.c8bcb1cb78f9e45e2bcb.eot
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11,096 changes: 11,096 additions & 0 deletions docs/3.1.4/Roboto-BoldItalic.c2e0f75da3677f645034.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
10,564 changes: 10,564 additions & 0 deletions docs/3.1.4/Roboto-Light.054fa50baa6598a7bf0c.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/3.1.4/Roboto-Light.183079184d96a491f16e.eot
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Light.37fbbbad5577a95bdf05.woff
Binary file not shown.
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Light.a2b8c641546c0e5a95e2.ttf
Binary file not shown.
Binary file not shown.
10,646 changes: 10,646 additions & 0 deletions docs/3.1.4/Roboto-LightItalic.1a9e39e536aed26b863b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10,999 changes: 10,999 additions & 0 deletions docs/3.1.4/Roboto-Medium.2b4f394ce87ea4e7a68b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11,100 changes: 11,100 additions & 0 deletions docs/3.1.4/Roboto-MediumItalic.eb65fb18d4446e4ac27d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10,520 changes: 10,520 additions & 0 deletions docs/3.1.4/Roboto-Regular.766c8926f6d9061fef24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
10,629 changes: 10,629 additions & 0 deletions docs/3.1.4/Roboto-RegularItalic.527502d7927a41ca0b6a.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Thin.790ebf41d0214f5eda4e.woff2
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Thin.90d3804f0231704c15cc.woff
Binary file not shown.
10,617 changes: 10,617 additions & 0 deletions docs/3.1.4/Roboto-Thin.ba422f71e799f3d29cbf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/3.1.4/Roboto-Thin.c25fd8d00fd9f570545d.eot
Binary file not shown.
Binary file added docs/3.1.4/Roboto-Thin.cc85ce37b4256966e6f3.ttf
Binary file not shown.
Binary file not shown.
10,726 changes: 10,726 additions & 0 deletions docs/3.1.4/Roboto-ThinItalic.21e9a2e5ed0b0d8d1bb7.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
222 changes: 222 additions & 0 deletions docs/3.1.4/assets/articles/customization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
### Overview
Customization of `react-native-ui-kitten` is really easy and very extensible.
It allows you to build beautiful and flexible component styles in a simple and elegant way.

### rkType

Most of the components in this framework contain *rkType* property.
For those who's familiar with web, you can think of it as an HTML *class* property.
Fundamentally, the idea is to separate styles definition from jsx templates.
Our components already have a set of predefined rkTypes.
Moreover, you can configure *rkType*s somewhere in your application and then you're able to reuse that style in your components by just passing it as an input property.
In addition it's always possible to override types for some specific component.

For example, consider this code:

```
import {RkButton} from 'react-native-ui-kitten';
//...
<RkButton rkType='outline small'>
Say Hello
</RkButton>
```

In this case, `RkButton` will have two styles: *outline* (style that
draws a rounded border for a button) and *small* (the one that reduces button size).

You're able to create your custom *rkType*s for specific components.
Here is the example of creating *rkType* for rkButton:

```jsx
import {RkButton, RkTheme} from 'react-native-ui-kitten';

let accent = '#ed1c4d';

RkTheme.setType('RkButton', 'accent', {
container: {
backgroundColor: accent
}
content: {
color: 'white'
}
});

//...

<RkButton rkType='accent'>
Click me.
</RkButton>
```

### Default components, style aliases

All Rk components consist of internal components. For example RkButton it is `TouchableOpacity` with some content. In order to you can control styling of each internal component all Rx components provide special style mapping elements.
In case of RkButton they are 'container' and 'content'. And you can style them in an explicit way you can see above.

But every Rk component also has a default internal component to which all non-explicit styles will be applied implicitly. Also there are can be defined aliases for some style property.
In case of RkButton there is 'container' is default and there is exists alias 'color' for 'content'. With this in mind we can re-write code above:

```
...
RkTheme.setType('RkButton', 'accent', {
backgroundColor: accent
color: 'white'
});
...
```

### Platform-dependent styles

In some cases, it may be necessary to write different styles depending on current platform. It's possible to define a platform dependent value. Let's create `rkType` for `RkButton` which on *iOS* will have a blue background color and green on *Android*.

```jsx
import {RkTheme} from 'react-native-ui-kitten';

//...

RkTheme.setType('RkButton','different',{
backgroundColor: {
ios: 'blue',
android: 'green'
}
});

//... or using internal control components:

RkTheme.setType('RkButton','different',{
container: {
backgroundColor: {
ios: 'blue',
android: 'green'
}
}
});

```

### Default values
Sometimes it is very useful to set default style for all components in a whole application without need to set explicitly `rkType`
for each component. All *rk-components* have a type which always applied. The name of this type is set in `RkComponent.defaultType` variable.
All standard *rk-components* has defaultType `basic`. In order to change the style for all components - just override this type.

Let's change color and size for all `RkText` components in the app:

```jsx
RkTheme.setType('RkText', 'basic', {
fontSize: 12,
color: 'midnightblue'
});
```

### Themes

All base *rkTypes* depends on theme of an application. *Theme* contains base values (colors, fontSizes etc) for all *rk-components*.
You can easily override values in theme or even define your own theme using `RkTheme`.
But user-defined *rkType*s should also be able to respond theme changes.
For this purpose property functions can be used instead of values.
Let's create `rkType` for `RkText` which will depend on some value from the theme.

```jsx
RkTheme.setType('RkText','primaryBackground',{
backgroundColor: theme => theme.colors.primary
});
```

Variable `theme` here is an example of the current theme. So, in case the theme has been switched using `RkTheme.setTheme` function, the `rkType`
created above will also be changed and all components using this type will be updated as well.


Sometimes there is a necessity to use their values for regular components. In this case, you need to use `RkStyleSheet`.

### Inherit rkTypes

You're able to create your custom *rkType*s that based on others *rkType*s.
Fourth parameter of method *RkTheme.setType()* is array or string with parents *rkType*s.<br/>
Array format: *['parentType1', 'parentType2']*.<br/>
String format: *'parentType1 parentType2'*.<br/>
The properties of *parentType2* override the properties of *parentType1*. Third parameter of method *RkTheme.setType()* using after parents types.


Here is the example of creating *rkType* from parents types for rkText:

```
RkTheme.setType('RkText', 'inherited', {
fontSize: 40,
text: {
fontFamily: robotoLight,
lineHeight: {
ios: 41,
android: 43
},
}
}, "basic danger");
```

Where *basic* rkType:
```
basic: {
fontSize: theme.fonts.sizes.base,
color: theme.colors.text.base,
backgroundColor: 'transparent'
}
```

And *danger* rkType:
```
danger: {
color: theme.colors.danger
}
```

As result, we have *inherited* rkType:
```
inherited: {
fontSize: 40,
color: theme.colors.danger,
backgroundColor: 'transparent'
text: {
fontFamily: robotoLight,
lineHeight: {
ios: 45,
android: 43
},
}
}
```

### Using extractNonStyleValue() method of RkComponent
Style before method call:

```
style: {
flex: 1,
fontSize: 15,
alignSelf: 'center',
placeholderTextColor: '#0000008e',
marginVertical: 4,
marginLeft: 16
}
```
Method call:
```
//...
let placeholderColor = this.extractNonStyleValue(style, 'placeholderTextColor')
//...
```
Style and placeholderColor after method call:
```
placeholderColor: '#0000008e'
style: {
flex: 1,
fontSize: 15,
alignSelf: 'center',
marginVertical: 4,
marginLeft: 16
}
```
Loading

0 comments on commit ea44bee

Please sign in to comment.