Skip to content

Commit

Permalink
Move to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
woofers committed Jul 7, 2024
1 parent a962219 commit 1e52c9f
Show file tree
Hide file tree
Showing 7 changed files with 11,804 additions and 4,894 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Use PNPM
uses: pnpm/action-setup@v4
with:
version: 9.4.0
- name: Deploy Info
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Install
run: yarn install
run: pnpm install
- name: Build
run: yarn build
run: pnpm build
- name: Test
run: yarn test
run: pnpm test
- name: Install Prod
run: yarn install --prod
- name: Install Demo
run: yarn --cwd demo install
run: pnpm install --prod
- name: Build Demo
run: yarn --cwd demo build
run: pnpm -C demo build
- name: Test Demo
run: yarn --cwd demo test
run: pnpm -C demo test
- name: Publish
if: startsWith(github.ref, 'refs/tags/')
run: yarn publish --access public
run: pnpm publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish Demo
Expand Down
5 changes: 3 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"clean": "rimraf .next out build react-sheet-slide",
"build": "yarn clean && next build && mv build react-sheet-slide && mkdir build && mv react-sheet-slide build",
"build": "pnpm clean && next build && mv build react-sheet-slide && mkdir build && mv react-sheet-slide build",
"dev": "next dev",
"start": "serve build",
"lint": "next lint",
Expand All @@ -17,6 +17,7 @@
"@dnd-kit/core": "^6.0.5",
"@dnd-kit/modifiers": "^6.0.0",
"@dnd-kit/sortable": "^7.0.1",
"@dnd-kit/utilities": "v3.2.2",
"@react-spring/web": "^9.7.3",
"@stitches/react": "^1.2.8",
"@use-gesture/react": "^10.2.27",
Expand All @@ -30,7 +31,7 @@
"hast-util-to-html": "^8.0.4",
"lowlight": "^2.9.0",
"mdx-bundler": "^9.2.1",
"next": "^13.4.12",
"next": "^14.2.4",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
15 changes: 8 additions & 7 deletions demo/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Metadata } from 'next'
import type { Metadata, Viewport } from 'next'
import Data from './data'

const name = 'Jaxson Van Doorn'
Expand All @@ -9,17 +9,18 @@ const author = name
const description = 'Responsive React draggable sheet and dialog component'
const alt = ''

export const viewport = {
width: 'device-width',
initialScale: 1,
viewportFit: 'cover',
themeColor: '#070708',
} satisfies Viewport

export const metadata = {
title,
description,
creator: name,
publisher: name,
viewport: {
width: 'device-width',
initialScale: 1,
viewportFit: 'cover'
},
themeColor: '#070708',
icons: {
icon: [{ url: '/react-sheet-slide/favicon.ico' }],
shortcut: ['/react-sheet-slide/favicon.ico'],
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build:dev:module": "microbundle --no-pkg-main --no-sourcemap --jsx React.createElement --define __isDev__=true -i src/index.tsx -o lib/react-sheet-slide.dev.js -f es",
"build:dev:modern": "microbundle --no-pkg-main --no-sourcemap --jsx React.createElement --define __isDev__=true -i src/index.tsx -o lib/react-sheet-slide.dev.cjs -f umd",
"clean": "rimraf lib/react-sheet-slide.js lib/react-sheet-slide.cjs lib/react-sheet-slide.dev.js lib/react-sheet-slide.dev.cjs style.css lib/*.d.ts lib/utils lib/hooks",
"build": "yarn build:dev:module && yarn build:dev:modern && yarn build:module && yarn build:modern && yarn build:style",
"build": "pnpm build:dev:module && pnpm build:dev:modern && pnpm build:module && pnpm build:modern && pnpm build:style",
"test": "echo \"No tests \" && exit 0",
"format": "prettier --write \"{tests,src}/**/*.{js,mjs,ts,tsx}\""
},
Expand All @@ -54,25 +54,25 @@
"peerDependencies": {
"@react-spring/web": "^9.0.0",
"@use-gesture/react": "^10.0.0",
"react": "^16.8.0 || 17.x || 18.x",
"react-dom": "^16.8.0 || 17.x || 18.x"
"react": "^16.8.0 || >=17",
"react-dom": "^16.8.0 || >=17"
},
"devDependencies": {
"@react-spring/web": "^9.7.3",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@use-gesture/react": "^10.2.27",
"eslint": "^8.46.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-react-hooks": "^4.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@use-gesture/react": "^10.3.1",
"eslint": "^9.6.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"microbundle": "^0.15.1",
"prettier": "^3.0.1",
"rimraf": "^5.0.1",
"typescript": "^5.1.6"
"prettier": "^3.3.2",
"rimraf": "^5.0.8",
"typescript": "^5.5.3"
},
"dependencies": {}
}
Loading

0 comments on commit 1e52c9f

Please sign in to comment.