Skip to content

Commit a609426

Browse files
committed
feat(test): Update test cases and bump up version
1 parent 30188c7 commit a609426

File tree

3 files changed

+2
-166
lines changed

3 files changed

+2
-166
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scan",
3-
"version": "0.0.29",
3+
"version": "0.0.30",
44
"description": "Scan your React app for renders",
55
"keywords": [
66
"react",

src/cli.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
isCancel,
1515
cancel,
1616
spinner,
17-
outro,
1817
} from '@clack/prompts';
1918
import { bgMagenta, dim, red } from 'kleur';
2019
import fs from 'node:fs';

test/src/index.jsx

Lines changed: 1 addition & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const App = () => {
118118
href="https://github.com/aidenybai/react-scan#readme"
119119
className="cta-button"
120120
>
121-
View source
121+
Get started
122122
</a>
123123
<p>
124124
<small>
@@ -128,169 +128,6 @@ export const App = () => {
128128
</a>
129129
</small>
130130
</p>
131-
132-
<div className="installation-section">
133-
<h3>Install</h3>
134-
<p>Get started by adding this script to your app:</p>
135-
<div className="code-container">
136-
<code>
137-
&lt;script
138-
src=&quot;https://unpkg.com/react-scan/dist/auto.global.js&quot;&gt;&lt;/script&gt;
139-
</code>
140-
<button
141-
className="copy-button"
142-
onClick={() =>
143-
copyToClipboard(
144-
'<script src="https://unpkg.com/react-scan/dist/auto.global.js"></script>',
145-
)
146-
}
147-
>
148-
Copy
149-
</button>
150-
</div>
151-
<p>
152-
<small>
153-
<strong>Important:</strong> Add this before any other scripts
154-
run!
155-
</small>
156-
</p>
157-
<div className="framework-instructions">
158-
<div className="tabs">
159-
<button
160-
className={`tab-button ${activeTab === 'nextjs-pages' ? 'active' : ''}`}
161-
onClick={() => setActiveTab('nextjs-pages')}
162-
>
163-
Next.js (pages)
164-
</button>
165-
<button
166-
className={`tab-button ${activeTab === 'nextjs-app' ? 'active' : ''}`}
167-
onClick={() => setActiveTab('nextjs-app')}
168-
>
169-
Next.js (app)
170-
</button>
171-
<button
172-
className={`tab-button ${activeTab === 'vite' ? 'active' : ''}`}
173-
onClick={() => setActiveTab('vite')}
174-
>
175-
Other
176-
</button>
177-
</div>
178-
179-
<div className="tab-content">
180-
<div
181-
className={`tab-panel ${activeTab === 'nextjs-pages' ? 'active' : ''}`}
182-
>
183-
<h4>Next.js (Pages Router)</h4>
184-
<p>
185-
Add script tag to <code>_document.tsx</code> in{' '}
186-
<code>&lt;head&gt;</code>:
187-
</p>
188-
<div className="code-container">
189-
<pre
190-
style={{
191-
width: '100%',
192-
padding: '1rem',
193-
}}
194-
>
195-
<code
196-
dangerouslySetInnerHTML={{
197-
__html: highlight(
198-
`import { Html, Head, Main, NextScript } from 'next/document'
199-
200-
export default function Document() {
201-
return (
202-
<Html lang="en">
203-
<Head>
204-
<script src="https://unpkg.com/react-scan/dist/auto.global.js" async></script>
205-
{/* rest of your scripts go under */}
206-
</Head>
207-
<body>
208-
<Main />
209-
<NextScript />
210-
</body>
211-
</Html>
212-
)
213-
}`.trim(),
214-
),
215-
}}
216-
></code>
217-
</pre>
218-
</div>
219-
</div>
220-
221-
<div
222-
className={`tab-panel ${activeTab === 'nextjs-app' ? 'active' : ''}`}
223-
>
224-
<h4>Next.js (App Router)</h4>
225-
<p>
226-
Add to script tag to <code>layout.tsx</code> in{' '}
227-
<code>&lt;head&gt;</code>:
228-
</p>
229-
<div className="code-container">
230-
<pre
231-
style={{
232-
width: '100%',
233-
padding: '1rem',
234-
}}
235-
>
236-
<code
237-
dangerouslySetInnerHTML={{
238-
__html:
239-
highlight(`export default function RootLayout({
240-
children,
241-
}: {
242-
children: React.ReactNode
243-
}) {
244-
return (
245-
<html lang="en">
246-
<head>
247-
<script src="https://unpkg.com/react-scan/dist/auto.global.js" async></script>
248-
{/* rest of your scripts go under */}
249-
</head>
250-
<body>{children}</body>
251-
</html>
252-
)
253-
}`),
254-
}}
255-
></code>
256-
</pre>
257-
</div>
258-
</div>
259-
260-
<div
261-
className={`tab-panel ${activeTab === 'vite' ? 'active' : ''}`}
262-
>
263-
<h4>Other</h4>
264-
<p>
265-
Add to <code>index.html</code> in <code>&lt;head&gt;</code>:
266-
</p>
267-
<div className="code-container">
268-
<pre
269-
style={{
270-
width: '100%',
271-
padding: '1rem',
272-
}}
273-
>
274-
<code
275-
dangerouslySetInnerHTML={{
276-
__html: highlight(`<!DOCTYPE html>
277-
<html lang="en">
278-
<head>
279-
<script src="https://unpkg.com/react-scan/dist/auto.global.js"></script>
280-
<!-- rest of your scripts go under -->
281-
</head>
282-
<body>
283-
<!-- ... -->
284-
</body>
285-
</html>`),
286-
}}
287-
></code>
288-
</pre>
289-
</div>
290-
</div>
291-
</div>
292-
</div>
293-
</div>
294131
</div>
295132
</div>
296133
</TooltipContext.Provider>

0 commit comments

Comments
 (0)