Compare commits
12 commits
main
...
fastify-re
| Author | SHA1 | Date | |
|---|---|---|---|
| df15c7cc10 | |||
| ad0cec51b6 | |||
| 9928a9b125 | |||
| a1bfd77968 | |||
| 6c3efdec32 | |||
| 8a0e463fb2 | |||
| 903c01c005 | |||
| b285e0a73b | |||
| 7c0949c518 | |||
| 8a55ca61de | |||
| 185c274621 | |||
| 08c2497fab |
15 changed files with 6704 additions and 2407 deletions
4
CHANGESET.md
Normal file
4
CHANGESET.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Rough list of changes
|
||||
|
||||
1. Expose a `McFly` object containing event properties to `server:setup` scripts. Useful for handling requests like form submission.
|
||||
2. Add a cozy demo page for form handling using the exposed `McFly` object
|
||||
|
|
@ -19,7 +19,50 @@ To start or participate on discussions, see our [mcfly-discussions](https://list
|
|||
|
||||
## Contribute Code
|
||||
|
||||
Due to still figuring out how parts fit together, we are not ready for code contributions.
|
||||
We use `git` and `email` here -- it is actually fun!
|
||||
|
||||
To get started, setup [git send-email](https://git-send-email.io).
|
||||
|
||||
After setting up `git send-email` you can now follow the steps below to start hacking:
|
||||
|
||||
1️⃣ Clone the repository to your local machine, then go into the project directory:
|
||||
|
||||
```bash
|
||||
$ git clone https://git.ayo.run/ayo/mcfly
|
||||
$ cd mcfly
|
||||
```
|
||||
|
||||
2️⃣ Create a new branch for your changes:
|
||||
|
||||
```bash
|
||||
$ git checkout -b my-branch
|
||||
```
|
||||
|
||||
3️⃣ Make your changes, and then commit them with a descriptive message using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/):
|
||||
|
||||
```bash
|
||||
$ git commit -m "feat(core): implement server-side rendering"
|
||||
```
|
||||
|
||||
4️⃣ Use `git send-email` to send a patch:
|
||||
|
||||
```bash
|
||||
$ git send-email --to="~ayoayco/mcfly-patches@lists.sr.ht" HEAD^
|
||||
```
|
||||
|
||||
### Tips:
|
||||
|
||||
💡 You can set the default "to" address for the project:
|
||||
|
||||
```bash
|
||||
$ git config sendemail.to "~ayoayco/mcfly-patches@lists.sr.ht"
|
||||
```
|
||||
|
||||
💡 The `HEAD^` bit is a reference to the latest commit, which will be added to your patch. This could be a range of commits as well if you have mutiple commits.
|
||||
|
||||
5️⃣ After successfully sending your patch, wait for a response from us whether the patch needs rework... or a notification if it gets merged!
|
||||
|
||||
> As a summary, we use `git` and `email` to collaborate on McFly. You have to set up [git send-email](https://git-send-email.io) and send patches via email. :)
|
||||
|
||||
## Get in touch
|
||||
|
||||
|
|
|
|||
20
README.md
20
README.md
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/raw/branch/main/assets/mcfly-logo-sm.png" alt="McFly logo" />
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/blob/main/assets/mcfly-logo-sm.png" alt="McFly logo" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">McFly</h1>
|
||||
|
|
@ -29,13 +29,11 @@ I thought:
|
|||
|
||||
We are currently in a focused rewrite. All parts are subject to breaking changes in minor releases.
|
||||
|
||||
- [x] generic plugin system for using server frameworks
|
||||
- [x] file-based API routing via fastify as server framework
|
||||
- [ ] file-based HTML pages routing
|
||||
- [ ] HTML templating via Eta
|
||||
- [ ] file-based HTML pages routing & templating via Eta
|
||||
- [ ] auto-registry of custom elements
|
||||
- [ ] SSR custom elements
|
||||
- [ ] SSG builds
|
||||
- [ ] SSG
|
||||
|
||||
## Try it today
|
||||
|
||||
|
|
@ -64,12 +62,12 @@ npm create mcfly@latest
|
|||
|
||||
The following are the project packages published on the NPM registry:
|
||||
|
||||
| Package | Description | Version |
|
||||
| :------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| [`@mcflyjs/config`](https://ayco.io/n/@mcflyjs/config) | Configuration handling for McFly projects |  |
|
||||
| [`@mcflyjs/core`](https://ayco.io/n/@mcflyjs/core) | Commands & runtime handling |  |
|
||||
| [`@mcflyjs/fastify`](https://ayco.io/n/@mcflyjs/fastify) | Adapter for using fastify as server framework |  |
|
||||
| [`create-mcfly`](https://ayco.io/n/create-mcfly) | Script for scaffolding a new McFly workspace |  |
|
||||
| Package | Description | Version |
|
||||
| :----------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| [`@mcflyjs/config`](https://ayco.io/n/@mcflyjs/config) | Configuration handling for McFly projects |  |
|
||||
| [`@mcflyjs/core`](https://ayco.io/n/@mcflyjs/core) | Commands & runtime handling |  |
|
||||
| [`@mcflyjs/fastify`](https://ayco.io/n/@mcflyjs/core) | Adapter for using fastify as server framework |  |
|
||||
| [`create-mcfly`](https://ayco.io/n/create-mcfly) | Script for scaffolding a new McFly workspace |  |
|
||||
|
||||
## Project setup
|
||||
|
||||
|
|
|
|||
3
VALUES.md
Normal file
3
VALUES.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Values (initial)
|
||||
|
||||
Our core values include leaning on open standards and decentralized technologies, which do not require any form of lock-in. Therefore, you don’t need anything else than `git` and `email` to collaborate.
|
||||
3
mcfly.config.mjs
Normal file
3
mcfly.config.mjs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export default {
|
||||
from: 'root',
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/raw/branch/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/blob/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">McFly</h1>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/raw/branch/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/blob/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">McFly</h1>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,6 @@
|
|||
#!/usr/bin/env node
|
||||
import { defineCommand, runMain, type ArgsDef, type CommandDef } from 'citty'
|
||||
|
||||
export type Logger = {
|
||||
log: Function
|
||||
error: Function
|
||||
}
|
||||
|
||||
export type ServerConfig = {
|
||||
rootDir: string
|
||||
apiDir: string
|
||||
port: number
|
||||
logger: Logger
|
||||
}
|
||||
|
||||
const main: CommandDef<ArgsDef> = defineCommand({
|
||||
meta: {
|
||||
name: 'mcfly',
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/raw/branch/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/blob/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">Create McFly</h1>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "create-mcfly",
|
||||
"version": "0.4.8",
|
||||
"version": "0.4.7",
|
||||
"description": "Create a new McFly app",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/raw/branch/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/blob/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">McFly Fastify Adapter</h1>
|
||||
|
|
|
|||
|
|
@ -12,8 +12,5 @@
|
|||
"dependencies": {
|
||||
"@fastify/autoload": "6.3.1",
|
||||
"fastify": "5.8.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mcflyjs/core": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,6 @@ import Fastify from 'fastify'
|
|||
import AutoLoad from '@fastify/autoload'
|
||||
import path from 'node:path'
|
||||
|
||||
/**
|
||||
* @typedef {import('@mcflyjs/core').ServerConfig} ServerConfig
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {ServerConfig} param
|
||||
*/
|
||||
export default ({ rootDir, apiDir, logger, port }) => {
|
||||
const server = Fastify()
|
||||
const portNumber = port ?? 3000
|
||||
|
|
|
|||
9002
pnpm-lock.yaml
9002
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/raw/branch/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
<img width="250" src="https://git.ayo.run/ayo/mcfly/blob/main/assets/mcfly-logo-sm.png" alt="McFly Logo" />
|
||||
</p>
|
||||
|
||||
<h1 align="center">McFly Docs</h1>
|
||||
|
|
|
|||
Loading…
Reference in a new issue