Skip to content

Commit fdc99dc

Browse files
amalik2Adil Malik
andauthored
Use major/minor/patch labels + addon docs + test major (#23)
* Use major/minor/patch labels + addon doccs * Fix JSON error * Run prettier on CICD + don't fix errors in CICD Co-authored-by: Adil Malik <[email protected]>
1 parent 827592a commit fdc99dc

File tree

4 files changed

+36
-7
lines changed

4 files changed

+36
-7
lines changed

.autorc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
"first-time-contributor",
88
],
99
"labels": [
10-
{ "releaseType": "major", "name": "auto-major", overwrite: true },
11-
{ "releaseType": "minor", "name": "auto-minor", overwrite: true },
12-
{ "releaseType": "patch", "name": "auto-patch", overwrite: true }
10+
{
11+
"name": "dependency-update",
12+
"changelogTitle": "🔩 Dependency Updates",
13+
"releaseType": "none"
14+
}
1315
],
1416
"prereleaseBranches": ["next", "alpha", "beta"],
1517
"name": "lshadler",

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ aliases:
1010
paths: &cache-modules-paths
1111
- ~/.cache/yarn
1212
- node_modules
13+
- packages/appetize-utils/node_modules
1314
- packages/native/node_modules
1415
- packages/native-addon/node_modules
15-
- packages/appetize-utils/node_modules
16+
- packages/native-components/node_modules
17+
- packages/native-devices/node_modules
18+
- packages/native-types/node_modules
1619
# Necessary so that linting is faster on CI
1720
- .eslintcache
1821
- &yarn
@@ -89,6 +92,9 @@ jobs:
8992
- run:
9093
name: Lint
9194
command: yarn lint --cache
95+
- run:
96+
name: Prettier
97+
command: yarn prettier
9298
- save_cache: *cache-modules
9399
release:
94100
executor: sb_node

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"scripts": {
2626
"build": "lerna run build --stream",
2727
"build:storybook": "lerna run build:storybook --stream",
28-
"lint": "eslint --ext .ts --ext .tsx --fix .",
29-
"prettier": "prettier './**/*.(ts|tsx|js|jsx)' --write",
28+
"lint": "eslint --ext .ts --ext .tsx .",
29+
"prettier": "prettier './**/*.(ts|tsx|js|jsx)'",
3030
"test": "echo Test",
3131
"release": "auto shipit"
3232
},
@@ -53,7 +53,7 @@
5353
},
5454
"husky": {
5555
"hooks": {
56-
"pre-commit": "yarn prettier && yarn lint"
56+
"pre-commit": "yarn prettier --write && yarn lint --fix"
5757
}
5858
}
5959
}

packages/native-addon/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# @storybook/native-addon
2+
This module contains an addon that can be used to interact with the appetize.io emulator.
3+
Currently, it lets you rotate the emulator left or right, take screenshots, and change the device that is being emulated.
4+
5+
## Installation
6+
`npm install @storybook/native-addon`
7+
or
8+
`yarn add @storybook/native-addon`
9+
10+
## Usage
11+
Add `"@storybook/native-addon/dist/register.js"` to the addons section of your `main.js` file.
12+
13+
Add the following to your `preview.js` file:
14+
```jsx
15+
import { DeviceDecorator } from "@storybook/native-addon";
16+
17+
export const decorators = [DeviceDecorator];
18+
```
19+
20+
An example main.js can be found [here](../../examples/controls/.storybook/main.js).
21+
An example preview.js can be found [here](../../examples/controls/.storybook/preview.js).

0 commit comments

Comments
 (0)