-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
731 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
const util = require('cypress/lib/util'); | ||
const execa = require('execa'); | ||
import { spawn } from 'child_process'; | ||
|
||
const pkg = util.pkgVersion(); | ||
const child = spawn('npm', ['run', 'cypress:install'], { | ||
stdio: 'inherit' | ||
}); | ||
|
||
(async () => { | ||
console.log('Installing Cypress ' + pkg); | ||
await execa('npm', ['run', 'cypress:install'], { | ||
env: { CYPRESS_INSTALL_BINARY: pkg } | ||
}); | ||
console.log('Cypress installed'); | ||
})(); | ||
child.on('close', code => { | ||
if (code) { | ||
console.error('Cypress installation failed with code:', code); | ||
} | ||
}); | ||
|
||
child.on('error', error => { | ||
console.error('Cypress installation error:', error); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const { defineConfig } = require('cypress'); | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:3001', | ||
retries: 4 | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
12 changes: 8 additions & 4 deletions
12
cypress/integration/play-button.js → cypress/e2e/play-button.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "esnext", | ||
"allowSyntheticDefaultImports": true, | ||
"sourceMap": true, | ||
"jsx": "preserve", | ||
"allowJs": false, | ||
"noImplicitAny": true, | ||
"moduleResolution": "node", | ||
"isolatedModules": true, | ||
"types": ["node","cypress"] | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta content="IE=edge" http-equiv="X-UA-Compatible" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, minimum-scale=1.0, maximum-scale=8.0" | ||
/> | ||
<meta content="X5tHeKjV-jMLyp4VMoUhW9PAYaOjtPslV250" name="csrf-token" /> | ||
<link href="https://coderadio.freecodecamp.org" rel="canonical" /> | ||
<meta | ||
content="Code Radio - 24/7 concentration music for developers" | ||
property="og:title" | ||
/> | ||
<meta content="freeCodeCamp.org" property="og:site_name" /> | ||
<meta content="on" name="twitter:widgets:csp" /> | ||
<meta content="d0bc047a482c03c24f1168004c2a216a" name="p:domain_verify" /> | ||
<meta content="https://coderadio.freecodecamp.org" property="og:url" /> | ||
<meta | ||
content="Code Radio - 24/7 concentration music for developers" | ||
property="og:description" | ||
/> | ||
<meta | ||
content="https://cdn.freecodecamp.org/coderadio/coderadio-meta-1920x1080.png" | ||
property="og:image" | ||
/> | ||
<meta content="article" property="og:type" /> | ||
<meta | ||
content="https://www.facebook.com/freecodecamp" | ||
property="article:publisher" | ||
/> | ||
<meta content="Responsive" property="article:section" /> | ||
<meta content="Support" name="description" /> | ||
<meta content="@freecodecamp" name="twitter:creator" /> | ||
<meta content="https://coderadio.freecodecamp.org" name="twitter:url" /> | ||
<meta content="@freecodecamp" name="twitter:site" /> | ||
<meta content="summary_large_image" name="twitter:card" /> | ||
<meta | ||
content="https://cdn.freecodecamp.org/coderadio/coderadio-meta-1920x1080.png" | ||
name="twitter:image:src" | ||
/> | ||
<meta content="Code Radio" name="twitter:title" /> | ||
<meta | ||
content="24/7 concentration music for developers" | ||
name="twitter:description" | ||
/> | ||
<meta content="a40ee5d5dba3bb091ad783ebd2b1383f" name="p:domain_verify" /> | ||
<meta content="#FFFFFF" name="msapplication-TileColor" /> | ||
<meta | ||
content="https://cdn.freecodecamp.org/universal/favicons/browserconfig.xml" | ||
rel="msapplication-config" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/android-chrome-192x192.png" | ||
rel="android-chrome" | ||
sizes="192x192" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/android-chrome-384x384.png" | ||
rel="android-chrome" | ||
sizes="384x384" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/site.webmanifest" | ||
rel="manifest" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/apple-touch-icon.png" | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/favicon-16x16.png" | ||
rel="favicon" | ||
sizes="16x16" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/favicon-32x32.png" | ||
rel="favicon" | ||
sizes="32x32" | ||
/> | ||
<link | ||
href="https://cdn.freecodecamp.org/universal/favicons/favicon.ico" | ||
rel="icon" | ||
/> | ||
<title>freeCodeCamp.org Code Radio</title> | ||
<script | ||
async | ||
src="https://www.googletagmanager.com/gtag/js?id=UA-55446531-21" | ||
></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { | ||
dataLayer.push(arguments); | ||
} | ||
gtag('js', new Date()); | ||
gtag('config', 'UA-55446531-21'); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer> | ||
new Crate({ | ||
server: '692816967895220344', // freeCodeCamp.org Official ᕕ(⌐■_■)ᕗ ♪♬ | ||
channel: '1254842489362317322' // #code-radio | ||
}) | ||
const button = document.querySelector('crate > div').shadowRoot.querySelector("button"); | ||
button.style.bottom = "90px"; | ||
const embed = document.querySelector('crate > div').shadowRoot.querySelector(".embed"); | ||
embed.style.bottom = "90px"; | ||
// we only need to adjust the height at the iframe's mobile breakpoint. | ||
// This does break during resizing, but I think that's enough of an edge case. | ||
if (window.innerWidth <= 500) { | ||
embed.style.maxHeight = "calc(100% - 80px)" | ||
} | ||
</script> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Sentry DSN - a public id that identifies your app to Sentry | ||
REACT_APP_SENTRY_DSN=<DSN-from-sentry-project-settings> | ||
VITE_SENTRY_DSN=<DSN-from-sentry-project-settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
|
||
function Pause(): JSX.Element { | ||
|
||
return (<svg viewBox='0 0 640 640' fill='currentColor'> | ||
<title>Pause Button</title> | ||
<path d='M0 0L235.67 0L235.67 640L0 640L0 0Z' /> | ||
<path d='M404.33 0L640 0L640 640L404.33 640L404.33 0Z' /> | ||
</svg> | ||
); | ||
} | ||
|
||
|
||
Pause.displayName = 'Caret'; | ||
export default Pause; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
|
||
function Play(): JSX.Element { | ||
|
||
return ( | ||
<svg viewBox='0 0 640 640' fill='#fff'> | ||
<title>Play Button</title> | ||
<path d='M0 0L649.1 320L0 640L0 0Z' /> | ||
</svg> | ||
); | ||
} | ||
|
||
Play.displayName = 'Play'; | ||
export default Play; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
import { createRoot } from 'react-dom/client'; | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
ReactDOM.render(<App />, div); | ||
ReactDOM.unmountComponentAtNode(div); | ||
const root = createRoot(div!); | ||
root.render(<App />); | ||
}); |
Oops, something went wrong.