Skip to content

Commit e4b4d14

Browse files
committed
chore(examples): change way we import file
1 parent 4f1c1c6 commit e4b4d14

10 files changed

Lines changed: 31 additions & 18 deletions

File tree

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

examples/with-nextjs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"dependencies": {
1212
"react": "19.2.0",
1313
"react-dom": "19.2.0",
14-
"next": "15.5.4"
14+
"next": "15.5.4",
15+
"react-plock": "workspace:*"
1516
},
1617
"devDependencies": {
1718
"typescript": "^5",

examples/with-nextjs/src/app/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
'use client';
22

3-
import { images } from '@assets/data/images';
4-
import { Masonry } from '@local/lib';
5-
import { Button } from './ui/Button';
63
import { useState } from 'react';
4+
import { Masonry } from 'react-plock';
5+
import { Button } from './ui/Button';
76

87
const items = [
98
{ height: 600, color: '#D32F2F', id: 1 }, // Extra Tall - Darker Red

examples/with-nextjs/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
],
2121
"paths": {
2222
"@/*": ["./src/*"],
23-
"@local/lib": ["../../libs/react-plock/src/index"],
2423
"@assets/*": ["../../assets/*"]
25-
}
24+
},
25+
"target": "ES2017"
2626
},
2727
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
2828
"exclude": ["node_modules"]

examples/with-vite/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dependencies": {
1212
"react": "^18.2.0",
1313
"react-dom": "^18.2.0",
14+
"react-plock": "workspace:*",
1415
"vite-tsconfig-paths": "^4.3.1"
1516
},
1617
"devDependencies": {

examples/with-vite/src/ReactPlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Masonry } from '@local/lib';
1+
import { Masonry } from 'react-plock';
22
import { useState } from 'react';
33
import { Button } from './ui/Button';
44

examples/with-vite/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"noEmit": true,
1818
"jsx": "react-jsx",
1919
"paths": {
20-
"@local/lib": ["../../libs/react-plock/src/index"],
2120
"@assets/*": ["../../assets/*"]
2221
}
2322
},

libs/react-plock/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"types": "dist/index.d.ts",
1212
"exports": {
1313
".": {
14+
"types": "./dist/index.d.ts",
1415
"import": "./dist/index.es.js",
1516
"require": "./dist/index.cjs.js"
1617
}

pnpm-lock.yaml

Lines changed: 14 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
packages:
2-
- "libs/*"
3-
- "examples/*"
2+
- libs/*
3+
- examples/*
4+
5+
ignoredBuiltDependencies:
6+
- sharp

0 commit comments

Comments
 (0)