+ React Sunbeam calculates the closest element in the specified direction to pass focus + to. +
++ It ensures the interaction always feels natural to the user, but also allows fine-tuning + that through the flexible API. +
+ > + } + graphic={diff --git a/packages/react-sunbeam/.eslintrc.js b/.eslintrc.js similarity index 100% rename from packages/react-sunbeam/.eslintrc.js rename to .eslintrc.js diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 6798103..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish on PR merge - -on: - pull_request: - types: closed - -jobs: - build-and-publish: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - with: - ref: master - - - name: Configure Git - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --local user.name "GitHub Publish Action" - git config --local user.email "action@users.noreply.github.com" - git remote set-url origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git - git checkout master - - - name: Setup node - uses: actions/setup-node@v1.1.0 - with: - node-version: "14.x" - registry-url: "https://registry.npmjs.org" - - - run: yarn install - - - name: Check credentials - run: | - yarn logout - echo "registry=http://registry.npmjs.org/" >> .npmrc - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc - npm whoami - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: Publish - run: yarn release --yes - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 372c6e7..4bc0a3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [16.x] steps: - uses: actions/checkout@v1 @@ -20,10 +20,11 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: yarn install, build, and test + - name: build and test run: | yarn install - yarn build - yarn test + make build + make test + make lint env: CI: true diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c04eac3 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +DEFAULT_GOAL: build + +clean: + make -C packages/demo $@ + make -C packages/react-sunbeam $@ + +build: clean + make -C packages/react-sunbeam $@ + make -C packages/demo $@ + +dev: build + yarn concurrently -n sunb,demo -c red,blue \ + "make -C packages/react-sunbeam ${@}" \ + "make -C packages/demo ${@}" + +lint: + make -C packages/react-sunbeam $@ + make -C packages/demo $@ + +type-check: + make -C packages/react-sunbeam $@ + make -C packages/demo $@ + +test: + make -C packages/react-sunbeam $@ + +PHONY: clean build dev type-check test diff --git a/README.md b/README.md index 581f374..4694734 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@

- Spatial navigation and focus management system for React apps -
-
-
+ Spatial navigation and key press management for React apps
+ React Sunbeam calculates the closest element in the specified direction to pass focus + to. +
++ It ensures the interaction always feels natural to the user, but also allows fine-tuning + that through the flexible API. +
+ > + } + graphic={
- Spatial navigation and focus management system for React apps + Spatial navigation and key press management for React apps