-
Notifications
You must be signed in to change notification settings - Fork 90
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
14 changed files
with
1,763 additions
and
15,381 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { "targets": "> 0.25%, not dead" }], | ||
"@babel/preset-react" | ||
] | ||
} |
2 changes: 0 additions & 2 deletions
2
apps/top-flex-box-example/src/App.js → apps/top-flex-box-example/client/index.jsx
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,5 +1,3 @@ | ||
import { Sandpack } from "@codesandbox/sandpack-react" | ||
|
||
function App() { | ||
return ( | ||
<Sandpack | ||
|
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,16 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<link rel="stylesheet" href="styles.css" /> | ||
<title>The Odin Project Flexbox Example</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script> | ||
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script> | ||
<script src="bundle.js"></script> | ||
</body> | ||
|
||
</html> |
16,975 changes: 1,669 additions & 15,306 deletions
16,975
apps/top-flex-box-example/package-lock.json
Large diffs are not rendered by default.
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,27 +1,27 @@ | ||
{ | ||
"name": "top-flex-box-example", | ||
"version": "0.1.0", | ||
"private": true, | ||
"name": "top-flexbox-example-one", | ||
"version": "0.0.1", | ||
"description": "Front end project for freeCodeCamp", | ||
"main": "server.js", | ||
"scripts": { | ||
"start": "node server.js", | ||
"build": "rollup -c", | ||
"prepare": "npm run build" | ||
}, | ||
"dependencies": { | ||
"@codesandbox/sandpack-react": "^2.10.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-scripts": "5.0.1" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build" | ||
"dotenv": "16.0.0", | ||
"express": "4.17.3" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
"devDependencies": { | ||
"@babel/core": "7.23.2", | ||
"@babel/preset-env": "7.23.2", | ||
"@babel/preset-react": "7.22.15", | ||
"@rollup/plugin-babel": "6.0.4", | ||
"@rollup/plugin-commonjs": "23.0.7", | ||
"@rollup/plugin-node-resolve": "15.0.1", | ||
"@rollup/plugin-replace": "5.0.5", | ||
"@rollup/plugin-terser": "0.2.0", | ||
"rollup": "2.79.1" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} |
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,26 @@ | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import babel from '@rollup/plugin-babel'; | ||
import replace from '@rollup/plugin-replace'; | ||
import terser from '@rollup/plugin-terser'; | ||
|
||
export default { | ||
input: 'client/index.jsx', | ||
output: { | ||
file: 'public/bundle.js', | ||
format: 'iife', | ||
name: 'Client' | ||
}, | ||
plugins: [ | ||
resolve({ moduleDirectories: ['node_modules'] }), | ||
replace({ | ||
preventAssignment: true, | ||
'process.env.NODE_ENV': JSON.stringify('production') | ||
}), | ||
commonjs({ | ||
include: /node_modules/ | ||
}), | ||
babel({ babelHelpers: 'bundled' }), | ||
terser() | ||
] | ||
}; |
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 @@ | ||
PORT=3000 |
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,19 @@ | ||
require('dotenv').config(); | ||
const express = require('express'); | ||
const app = express(); | ||
|
||
app.use(express.static('public')); | ||
|
||
app.get('', (req, res) => { | ||
res.sendFile(`${process.cwd()}/index.html`); | ||
}); | ||
|
||
app.get('/status/ping', (req, res) => { | ||
res.send({ msg: 'pong' }).status(200); | ||
}); | ||
|
||
const portNum = process.env.PORT || 3000; | ||
|
||
app.listen(portNum, () => { | ||
console.log(`Listening on port ${portNum}`); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.