Skip to content

Commit

Permalink
Setup hello world vite site
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins committed Jan 2, 2025
1 parent 339e316 commit b7e4fd5
Show file tree
Hide file tree
Showing 129 changed files with 75 additions and 201 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
dist/
node_modules/
*.log
.DS_Store
public/static.json
src/shared/static.json
.env
tmp
.enhance
.enhance
File renamed without changes.
44 changes: 44 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SeattleJS</title>
<meta
name="description"
content="SeattleJS is the largest JavaScript and web developer meetup in Seattle. Our meetings are the 2nd Wednesday of each month. We are an inclusive community and welcome everyone, including folks who are just getting started in tech."
/>
<link rel="stylesheet" href="/_public/styles/main.css" />
<link rel="shortcut icon" href="/_public/favicon.jpg" />
<link rel="stylesheet" href="https://use.typekit.net/smc6vzy.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css"
integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<!-- ${ sharing ? `
<meta
name="image"
property="og:image"
content="${ baseUrl }${ sharing.image }"
/>
<meta name="url" property="og:url" content="${ baseUrl }${ path }" />
<meta name="type" property="og:type" content="website" />
<meta name="author" content="Carter Rabasa" />
<meta property="og:title" content="${ title }" />
<meta name="twitter:image" content="${ baseUrl }${ sharing.image }" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@seattlejs" />
<meta name="twitter:title" content="${ title }" />
`: '' } -->
<!-- ${ path === '/conf' ? `
<script src="https://js.tito.io/v2" async></script>
` : `` } -->
</head>
<body>
<div id="root"></div>
<script src="./src/index.tsx" type="module"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"@preact/preset-vite": "^2.9.3",
"eslint": "latest",
"eslint": "^8.46.0",
"eslint-config-prettier": "^8.6.0",
"prettier": "^2.8.8",
"typescript": "^5.7.2",
Expand All @@ -25,6 +25,7 @@
"serve": "vite preview",
"start": "vite",
"lint": "npm run tsc && npm run check-format",
"eslint": "eslint src/**/*.{js,jsx,ts,tsx}",
"tsc": "tsc -p tsconfig.json",
"check-format": "prettier --no-error-on-unmatched-pattern --check **/*.{js,jsx,ts,tsx,css,md,html,yml,yaml,json}",
"format": "prettier --no-error-on-unmatched-pattern --write **/*.{js,jsx,ts,tsx,css,md,html,yml,yaml,json}"
Expand All @@ -41,26 +42,20 @@
"homepage": "https://github.com/seattlejs/seattlejs.com#readme",
"eslintConfig": {
"env": {
"browser": true,
"node": true
},
"extends": [
"eslint:recommended",
"prettier"
],
"ignorePatterns": [
"public/scripts/*",
"src/*"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"requireConfigFile": false,
"babelOptions": {
"plugins": [
"@babel/plugin-syntax-import-assertions"
]
},
"sourceType": "module",
"ecmaVersion": 2022
"ecmaVersion": 2022,
"ecmaFeatures": {
"jsx": true
}
}
}
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions public/scripts/app.js → public/_public/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -920,9 +920,9 @@
const start = /* @__PURE__ */ new Date().getTime()
function log2(...args) {
warn(
`${(/* @__PURE__ */ (new Date().getTime() - start) / 1e3).toFixed(
2
)} [FSM #${machine.id}]`,
`${
/* @__PURE__ */ ((new Date().getTime() - start) / 1e3).toFixed(2)
} [FSM #${machine.id}]`,
...args
)
}
Expand Down
File renamed without changes.
File renamed without changes.
Binary file removed public/images/speakers/andrew-enyeart.png
Diff not rendered.
Binary file removed public/images/speakers/justin-castilla.png
Diff not rendered.
90 changes: 0 additions & 90 deletions scripts/live-stream.js

This file was deleted.

3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function App() {
return <div>Hello World!</div>
}
94 changes: 0 additions & 94 deletions src/app.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { render } from 'preact'
import App from './App'

const root = document.getElementById('root')
if (!root) throw new Error('Root element not found')
render(<App />, root)
9 changes: 9 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vite'
import preact from '@preact/preset-vite'

// https://vitejs.dev/config/
export default defineConfig({
base: '/preact-starter/',
publicDir: 'public',
plugins: [preact()],
})

0 comments on commit b7e4fd5

Please sign in to comment.