-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from mrjvs/dev
Guider v0.1.0 - BETA
- Loading branch information
Showing
255 changed files
with
10,013 additions
and
317 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Docs - deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install pnpm packages | ||
run: pnpm install | ||
|
||
- name: Build @neato/guider | ||
run: cd packages/guider && pnpm run build | ||
|
||
- name: Build | ||
run: cd apps/docs && pnpm run build | ||
|
||
- name: Upload site | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: apps/docs/out | ||
|
||
deploy: | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,50 @@ | ||
name: Guider - publish version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
outputs: | ||
checked: ${{ steps.changed-files.outputs.any_modified }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v42 | ||
with: | ||
files: | | ||
packages/guider/** | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [check] | ||
environment: | ||
name: npm | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install pnpm packages | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: cd packages/guider && pnpm run build | ||
|
||
- name: Publish | ||
run: pnpm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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 |
---|---|---|
|
@@ -5,3 +5,6 @@ dist | |
.idea | ||
.DS_Store | ||
.next | ||
out | ||
/test.js | ||
/test.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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 NeatoJS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,59 @@ | ||
.container > * { | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.container > *:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
.card { | ||
display: flex; | ||
gap: .5rem; | ||
border: 1px solid #0F2B33; | ||
border-radius: 15px; | ||
padding: 1.5rem; | ||
transition: border-color 100ms ease-in-out; | ||
} | ||
.card:hover { | ||
border-color: #1e4853; | ||
} | ||
|
||
.body { | ||
flex: 1; | ||
} | ||
|
||
.right { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.title { | ||
font-size: 1.25rem; | ||
color: white; | ||
margin-bottom: 0.5rem; | ||
font-weight: bold; | ||
display: inline-block; | ||
} | ||
.title:hover { | ||
opacity: 0.75; | ||
} | ||
|
||
.desc { | ||
line-height: 1.3; | ||
max-width: 320px; | ||
} | ||
|
||
.icon { | ||
font-size: 1.75rem; | ||
margin-top: 0.2rem; | ||
color: #50A0EA; | ||
} | ||
|
||
@media screen and (max-width: 740px) { | ||
.card { | ||
flex-direction: column; | ||
} | ||
.right { | ||
margin-top: 2rem; | ||
} | ||
} |
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,40 @@ | ||
import type { ReactNode } from 'react'; | ||
import { Icon } from '@neato/guider/client'; | ||
import Link from 'next/link'; | ||
import styles from './home-card.module.css'; | ||
|
||
function Card(props: { | ||
children?: ReactNode; | ||
right?: ReactNode; | ||
icon: string; | ||
}) { | ||
return ( | ||
<div className={styles.card}> | ||
<Icon icon={props.icon} className={styles.icon} /> | ||
<div className={styles.body}>{props.children}</div> | ||
<div className={styles.right}>{props.right}</div> | ||
</div> | ||
); | ||
} | ||
|
||
function Title(props: { children?: ReactNode; href: string }) { | ||
return ( | ||
<Link href={props.href}> | ||
<h1 className={styles.title}>{props.children}</h1> | ||
</Link> | ||
); | ||
} | ||
|
||
function Description(props: { children?: ReactNode }) { | ||
return <p className={styles.desc}>{props.children}</p>; | ||
} | ||
|
||
export function HomeCardContainer(props: { children?: ReactNode }) { | ||
return <div className={styles.container}>{props.children}</div>; | ||
} | ||
|
||
export const HomeCard = { | ||
Card, | ||
Title, | ||
Description, | ||
}; |
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 @@ | ||
.home { | ||
max-width: 750px; | ||
margin: 5rem auto; | ||
} | ||
|
||
.title { | ||
font-size: 2rem; | ||
color: white; | ||
margin-bottom: 1.5rem; | ||
font-weight: bold; | ||
max-width: 480px; | ||
} | ||
|
||
.subtitle { | ||
font-size: 1.125rem; | ||
line-height: 1.3; | ||
max-width: 480px; | ||
margin-bottom: 4rem; | ||
} |
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,20 @@ | ||
import type { ReactNode } from 'react'; | ||
import styles from './home.module.css'; | ||
|
||
function Container(props: { children?: ReactNode }) { | ||
return <div className={styles.home}>{props.children}</div>; | ||
} | ||
|
||
function Title(props: { children?: ReactNode }) { | ||
return <h1 className={styles.title}>{props.children}</h1>; | ||
} | ||
|
||
function Subtitle(props: { children?: ReactNode }) { | ||
return <p className={styles.subtitle}>{props.children}</p>; | ||
} | ||
|
||
export const Home = { | ||
Container, | ||
Title, | ||
Subtitle, | ||
}; |
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,23 @@ | ||
.logo img { | ||
height: 2rem; | ||
margin-right: .5rem; | ||
} | ||
|
||
.logo { | ||
font-weight: 700; | ||
color: white; | ||
display: flex; | ||
align-items: center; | ||
transition: background-color 100ms ease-in-out, transform 100ms ease-in-out; | ||
border-radius: 5px; | ||
padding: .5rem; | ||
margin-left: -0.5rem; | ||
} | ||
|
||
.logo:hover { | ||
background-color: rgb(var(--colors-bgLightest)); | ||
} | ||
|
||
.logo:active { | ||
transform: scale(1.05); | ||
} |
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,10 @@ | ||
import Link from 'next/link'; | ||
import styles from './logo.module.css'; | ||
|
||
export function Logo() { | ||
return ( | ||
<Link href="/" className={styles.logo}> | ||
<img src="/logo.svg" /> NeatoJS | ||
</Link> | ||
); | ||
} |
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,4 +1,9 @@ | ||
const { guider } = require('@neato/guider'); | ||
|
||
const withGuider = guider(); | ||
module.exports = withGuider(); | ||
const withGuider = guider({ | ||
themeConfig: './theme.config.tsx', | ||
}); | ||
|
||
module.exports = withGuider({ | ||
output: 'export', | ||
}); |
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,3 @@ | ||
import { createNotFoundPage } from '@neato/guider/client'; | ||
|
||
export default createNotFoundPage(); |
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 @@ | ||
import '@neato/guider/style.css'; | ||
import { createGuiderApp } from '@neato/guider/client'; | ||
|
||
export default createGuiderApp(); |
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,3 @@ | ||
{ | ||
"site": "main" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"site": "config" | ||
} |
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,9 @@ | ||
# Error handling | ||
|
||
Configuration loading has some potentionally confusing error handling. | ||
By default, it will use the "pretty" assertion mode. This mode **will call process.exit(1)** instead of throwing errors. That means that you aren't able to catch it with a try-catch block. | ||
|
||
## The modes | ||
- `pretty` Log the errors in pretty formatting and colors, then exit the process. | ||
- `plain` Log the errors in plain text, then exit the process. | ||
- `throw` throw the errors where they occur. |
Oops, something went wrong.