Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(examples): cra pnpm fix #2897

Merged
merged 3 commits into from Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/with-create-react-app/apps/docs/package.json
Expand Up @@ -12,10 +12,10 @@
"clean": "rm -rf build"
},
"dependencies": {
"ui": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"ui": "workspace:*",
"web-vitals": "^2.1.2"
},
"devDependencies": {
Expand All @@ -26,6 +26,7 @@
"@types/node": "^16.11.14",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/testing-library__jest-dom": "^5.14.5",
"tsconfig": "workspace:*",
"typescript": "^4.5.4"
},
Expand Down
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React Docs App</title>
<title>Docs - Turborepo Example</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
28 changes: 8 additions & 20 deletions examples/with-create-react-app/apps/docs/src/App.css
Expand Up @@ -2,19 +2,16 @@
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
.Turborepo {
font-size: 72px;
background: linear-gradient(to right, #0099f7, #f11712);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}

.App-header {
background-color: #282c34;
background-color: #18181b;
min-height: 100vh;
display: flex;
flex-direction: column;
Expand All @@ -25,14 +22,5 @@
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
color: white;
}
Expand Up @@ -4,6 +4,6 @@ import App from "./App";

test("renders learn react link", () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
const linkElement = screen.getByText(/Turborepo Example/i);
expect(linkElement).toBeInTheDocument();
});
23 changes: 13 additions & 10 deletions examples/with-create-react-app/apps/docs/src/App.tsx
@@ -1,21 +1,24 @@
import React from "react";
import { Link } from "ui";

import "./App.css";
import logo from "./logo.svg";

function App() {
return (
<div className="App">
<header className="App-header">
<h1>Docs</h1>
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<Link className="App-link" href="https://reactjs.org">
Learn React
</Link>
<h1 className="header">
Docs
<div className="Turborepo">Turborepo Example</div>
</h1>
<div>
<Link className="App-link" href="https://turbo.build/repo">
Turborepo Docs
</Link>
<span> | </span>
<Link className="App-link" href="https://reactjs.org">
React Docs
</Link>
</div>
</header>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion examples/with-create-react-app/apps/docs/src/logo.svg

This file was deleted.

3 changes: 2 additions & 1 deletion examples/with-create-react-app/apps/web/package.json
Expand Up @@ -12,10 +12,10 @@
"clean": "rm -rf build"
},
"dependencies": {
"ui": "workspace:*",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",
"ui": "workspace:*",
"web-vitals": "^2.1.2"
},
"devDependencies": {
Expand All @@ -26,6 +26,7 @@
"@types/node": "^16.11.14",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/testing-library__jest-dom": "^5.14.5",
"tsconfig": "workspace:*",
"typescript": "^4.5.4"
},
Expand Down
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Web - Turborepo Example</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
28 changes: 8 additions & 20 deletions examples/with-create-react-app/apps/web/src/App.css
Expand Up @@ -2,19 +2,16 @@
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
.Turborepo {
font-size: 72px;
background: linear-gradient(to right, #0099f7, #f11712);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}

.App-header {
background-color: #282c34;
background-color: #18181b;
min-height: 100vh;
display: flex;
flex-direction: column;
Expand All @@ -25,14 +22,5 @@
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
color: white;
}
2 changes: 1 addition & 1 deletion examples/with-create-react-app/apps/web/src/App.test.tsx
Expand Up @@ -4,6 +4,6 @@ import App from "./App";

test("renders learn react link", () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
const linkElement = screen.getByText(/Turborepo Example/i);
expect(linkElement).toBeInTheDocument();
});
22 changes: 13 additions & 9 deletions examples/with-create-react-app/apps/web/src/App.tsx
@@ -1,20 +1,24 @@
import React from "react";
import { Link } from "ui";
import "./App.css";
import logo from "./logo.svg";

function App() {
return (
<div className="App">
<header className="App-header">
<h1>Web</h1>
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<Link className="App-link" href="https://reactjs.org">
Learn React
</Link>
<h1 className="header">
Web
<div className="Turborepo">Turborepo Example</div>
</h1>
<div>
<Link className="App-link" href="https://turbo.build/repo">
Turborepo Docs
</Link>
<span> | </span>
<Link className="App-link" href="https://reactjs.org">
React Docs
</Link>
</div>
</header>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion examples/with-create-react-app/apps/web/src/logo.svg

This file was deleted.