Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: onboard to auto #6

Merged
merged 12 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"projectName": "native",
"projectOwner": "storybookjs",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "none",
"contributors": [],
"contributorsPerLine": 7
}
16 changes: 16 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": [
"all-contributors",
"npm",
"conventional-commits",
"released",
"first-time-contributor",
],
"labels": [
{ "releaseType": "major", "name": "auto-major", overwrite: true },
{ "releaseType": "minor", "name": "auto-minor", overwrite: true },
{ "releaseType": "patch", "name": "auto-patch", overwrite: true }
],
"prereleaseBranches": ["next", "alpha", "beta"],
"name": "lshadler"
}
59 changes: 43 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
version: 2.1

cache-defaults: &cache-defaults
keys:
- oid-v1-{{ arch }}-{{ checksum "yarn.lock" }}

aliases:
- &cache-modules
key: oid-v1-{{ arch }}-{{ checksum "yarn.lock" }}
paths: &cache-modules-paths
- ~/.cache/yarn
- node_modules
- packages/native/node_modules
- packages/native-addon/node_modules
# Necessary so that linting is faster on CI
- .eslintcache
- &yarn
name: Installing Dependencies
command: yarn install --non-interactive --frozen-lockfile --cache-folder ~/.cache/yarn

executors:
sb_node:
parameters:
Expand Down Expand Up @@ -35,16 +53,20 @@ jobs:
name: sb_node
steps:
- checkout
- run:
name: Install dependencies
command: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
- restore_cache:
<<: *cache-defaults
- run: *yarn
- save_cache: *cache-modules

test:
executor: sb_node
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
<<: *cache-defaults
- run: *yarn
- run:
name: Test
command: yarn test
Expand All @@ -54,20 +76,29 @@ jobs:
- checkout
- attach_workspace:
at: .
- restore_cache:
<<: *cache-defaults
- run: *yarn
- run:
name: Lint
command: yarn lint
publish:
executor:
class: large
name: sb_node
command: yarn lint --cache
- save_cache: *cache-modules
release:
executor: sb_node
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
<<: *cache-defaults
- run: *yarn
- run:
name: Assume Github Role
command: 'git config --global user.email "lshadler13@gmail.com" && git config --global user.name "lshadler"'
- run:
name: Publish
command: yarn && yarn build && yarn run publish
name: Auto Shipit
command: |
yarn release
workflows:
test:
jobs:
Expand All @@ -78,11 +109,7 @@ workflows:
- test:
requires:
- build
- publish:
- release:
requires:
- test
- lint
filters:
branches:
only:
- master
- lint
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ fastlane/screenshots

storybook-static/
*.lock
!yarn.lock
*.log
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry="https://registry.npmjs.com"
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Storybook Native
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

This module is a build tool that allows creation of stories to view components inside of Android and iOS native applications easily inside of storybook. The intended purpose is for native developers to be able to quickly get started with storybook without having to learn how to write extensive amounts of JavaScript, and without having to learn how to use storybook.

Expand Down Expand Up @@ -94,3 +97,16 @@ Examples of how to use this module can be found [in this folder](examples/). The
- Run yarn to install dependencies
- `yarn build && cd examples/android-material-ui && yarn start`
Anytime changes are made, yarn build and start must be re-run

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
7 changes: 7 additions & 0 deletions husky.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}
24 changes: 20 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,38 @@
"Adil Malik <adil_malik@intuit.com>",
"Vanya Sehgal <vanya_sehgal@intuit.com>",
"Jay Unnikrishn <jayakrishnan_unnikrishnan@intuit.com>",
"Thomas Baker <thomas_baker@intuit.com>"
"Thomas Baker <thomas_baker@intuit.com>",
"Lucas Shadler <lshadler13@gmail.com>"
],
"workspaces": [
"packages/*",
"examples/*"
],
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"scripts": {
"build": "lerna run build --stream",
"lint": "echo Linting",
"lint": "eslint --ext .ts --ext .tsx .",
"test": "echo Test",
"publish": "lerna publish --canary --yes"
"release": "auto shipit"
},
"dependencies": {},
"devDependencies": {
"@auto-it/all-contributors": "10.0.2",
"@auto-it/conventional-commits": "10.0.2",
"@auto-it/first-time-contributor": "10.0.2",
"@auto-it/released": "10.0.2",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@typescript-eslint/eslint-plugin": "4.6.0",
"@typescript-eslint/parser": "4.6.0",
"auto": "10.0.2",
"eslint": "7.12.1",
"husky": "4.3.0",
"lerna": "3.20.2",
"sort-package-json": "^1.42.1",
"typescript": "3.9.7"
}
}
}
2 changes: 1 addition & 1 deletion packages/appetize-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface IncomingMessage {
}

let lastMessage: Message | null = null;
let connected: boolean = false;
let connected = false;

const messageEventHandler = (event: IncomingMessage) => {
if (event.data == "firstFrameReceived") {
Expand Down
4 changes: 2 additions & 2 deletions packages/native/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface StoryParams {
name: String;
appParams?: object;
name: string;
appParams?: Record<string, unknown>;
docs?: string;
}

Expand Down
Loading