Skip to content

Commit

Permalink
Yarn v2 (bpierre#4)
Browse files Browse the repository at this point in the history
Move to Yarn v2 for library and demo/, which makes it possible to use
the `portal:` protocol and increases installation speed (even though PnP
is not enabled for now).

The demo now deduplicates react and react-dom, which are required by the
library as devDendencies (for Jest) and was requiring to copy the
library in demo/node_modules, then manually delete
demo/node_modules/use-nft/node_modules/react. This shouldn’t be needed
anymore and has been removed from the gh-pages GitHub Action.
  • Loading branch information
bpierre authored Mar 28, 2021
1 parent baa1e5d commit 0461061
Show file tree
Hide file tree
Showing 11 changed files with 18,663 additions and 12,547 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v2

- name: Build use-nft
run: yarn install --frozen-lockfile && yarn build
run: yarn install --immutable && yarn build

- name: Build demo/
run: cd demo && yarn install --frozen-lockfile && rm -rf ./node_modules/use-nft/node_modules && yarn build
run: cd demo && yarn install --immutable && yarn build

- name: Deploy
uses: JamesIves/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v2

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Test
run: yarn test --ci --coverage --maxWorkers=2
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ coverage/
.cache/
.env
dist/

.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
622 changes: 622 additions & 0 deletions .yarn/releases/yarn-sources.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-sources.cjs
8 changes: 8 additions & 0 deletions demo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ node_modules
dist
dist-ssr
*.local

.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
622 changes: 622 additions & 0 deletions demo/.yarn/releases/yarn-sources.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"react": "^17.0.0",
"react-dom": "^17.0.0",
"react-spring": "^9.0.0-rc.3",
"use-nft": "file:..",
"use-nft": "portal:..",
"use-viewport": "git://github.com/aragon/use-viewport.git#master"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions demo/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import reactRefresh from "@vitejs/plugin-react-refresh"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [reactRefresh()],
resolve: { dedupe: ["react", "react-dom"] },
build: {
target: "es2019",
},
Expand Down
3,773 changes: 2,554 additions & 1,219 deletions demo/yarn.lock

Large diffs are not rendered by default.

26,165 changes: 14,841 additions & 11,324 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 0461061

Please sign in to comment.