diff --git a/README.md b/README.md index fac2c4c..34c7d3c 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ npm create mcfly@latest **3. `./src/api/`** - file-based routing for REST API endpoints -- e.g., `./routes/api/users.js` can be accessed via `http:///api/users` +- e.g., `./src/api/users.js` can be accessed via `http:///api/users` - TypeScript or JavaScript welcome! ## Packages @@ -75,6 +75,24 @@ The following are the project packages published on the NPM registry: | [`@mcflyjs/core`](https://ayco.io/n/@mcflyjs/core) | Route event and config handlers | ![npm version](https://img.shields.io/npm/v/%40mcflyjs%2Fcore) | | [`create-mcfly`](https://ayco.io/n/create-mcfly) | Script for scaffolding a new McFly workspace | ![npm version](https://img.shields.io/npm/v/create-mcfly) | +## Project setup + +After cloning the project, you will need [node](https://nodejs.org/en/download) and [pnpm installed](https://pnpm.io/installation). When you are sure that you have `node` and `pnpm`, then run the following to download the dependencies: + +``` +corepack enable +pnpm i +``` + +The following commands are available to you on this project. Add more, or modify them as needed in your `./package.json` file. + +| Command | Action | +| ----------------------- | ----------------------------------------------------- | +| pnpm run site | Start the development server for https://mcfly.js.org | +| pnpm run template:basic | Start the development server for the basic template | +| pnpm run build | Locally generate the app's build files to `./output` | +| pnpm run preview | Preview the built app locally | + ## More info This framework is a result of [an exploration](https://social.ayco.io/@ayo/111195315785886977) for using [Nitro](https://nitro.build) and custom elements using a minimal [Web Component Base](https://WebComponent.io) class. diff --git a/packages/config/README.md b/packages/config/README.md index cfea8b7..445b8c2 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -17,6 +17,7 @@ I often wonder what it would look like to build sites & apps knowing just the basics. I thought: + - What if I knew how to write HTML and I can have a dynamic web page from that? - What if I knew how to build custom elements and that's all the component system I needed? - What if I can write HTML fragments and assemble them easily in a page? @@ -25,10 +26,13 @@ I thought: **McFly** is my reimagination of web development: Back to the basics. Into the future. ## Project Status + We are currently in a Proof of Concept phase. All parts are subject to breaking changes in minor releases. ## Try it today + Run the following to generate a McFly starter project. + ``` npm create mcfly@latest ``` @@ -42,36 +46,43 @@ npm create mcfly@latest ✅ Deploy anywhere, even the Edge
## Special directories + **1. `./src/pages/`** + - file-based routing for `.html` files - directly use custom elements & static fragments (no imports or registry maintenance needed) - use `