Skip to content
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
6 changes: 0 additions & 6 deletions .github/workflows/docs-reanimated-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,12 @@ jobs:
- name: Install monorepo node dependencies
working-directory: packages/react-native-reanimated
run: yarn install
- name: Install Reanimated docs node dependencies
working-directory: ${{ env.REANIMATED_DOCS_DIR }}
run: yarn install
- name: Lint check Reanimated docs
working-directory: ${{ env.REANIMATED_DOCS_DIR }}
run: yarn lint
- name: Build Reanimated docs
working-directory: ${{ env.REANIMATED_DOCS_DIR }}
run: yarn build
- name: Install Worklets docs node dependencies
working-directory: ${{ env.WORKLETS_DOCS_DIR }}
run: yarn install
- name: Lint check Worklets docs
working-directory: ${{ env.WORKLETS_DOCS_DIR }}
run: yarn lint
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/docs-reanimated-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ jobs:
git config --local user.email "action@github.com"
&& git config --local user.name "GitHub Action"

- name: Install monorepo node dependencies
run: yarn install

- name: Build Reanimated docs
working-directory: ${{ env.REANIMATED_DOCS_DIR }}
run: yarn && yarn build
run: yarn build

- name: Build Worklets docs
working-directory: ${{ env.WORKLETS_DOCS_DIR }}
run: yarn && yarn build
run: yarn build

- name: Publish generated content to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
Expand Down
17 changes: 6 additions & 11 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ check_and_lint_docs() {
local docs_path="$2"
local docs_name="$3"

print "Checking for changes in $docs_name docs..."
print "Checking for changes in $docs_name..."
if echo "$staged_files" | grep "^$docs_path/" --silent; then
print "Changes spotted. Running $docs_name docs lint..."
try cd "$docs_path" && yarn install --frozen-lockfile && yarn lint
try yarn workspace "$docs_name" lint
print "Success."
else
print "No changes. Skipping $docs_name docs lint."
Expand Down Expand Up @@ -60,15 +60,10 @@ else
fi

# Linting docs
REANIMATED_DOCS_PATH="packages/docs-reanimated"
if [ -d "$REANIMATED_DOCS_PATH/node_modules" ]; then
check_and_lint_docs "$STAGED_FILES" "$REANIMATED_DOCS_PATH" "Reanimated"
fi

WORKLETS_DOCS_PATH="packages/docs-worklets"
if [ -d "$WORKLETS_DOCS_PATH/node_modules" ]; then
check_and_lint_docs "$STAGED_FILES" "$WORKLETS_DOCS_PATH" "Worklets"
fi
for DOCS in docs-reanimated docs-worklets; do
DOCS_PATH="packages/$DOCS"
check_and_lint_docs "$STAGED_FILES" "$DOCS_PATH" "$DOCS"
done

# This automatically builds Reanimated Babel plugin JavaScript files if their
# TypeScript counterparts were changed. It also adds the output file to the commit
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"packages/eslint-plugin-reanimated",
"packages/react-native-worklets/plugin",
"packages/react-native-worklets",
"packages/docs-reanimated",
"packages/docs-worklets",
"apps/common-app",
"apps/fabric-example",
"apps/macos-example",
Expand Down
Loading