0.1.4 ā€¢ Published 2 months ago

@mcflyjs/config v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Installation

Run the following to generate a McFly starter project:

npm create mcfly@latest

Features

The time has come for vanilla Web tech. šŸŽ‰

āœ… Create web apps with vanilla custom elements āœ… Write real .HTML files āœ… Have no frameworks or reactivity libraries on the browser āœ… Use server-side rendering āœ… Deploy anywhere

Special directories

1. ./src/pages/

  • file-based routing for .html files
  • directly use custom elements & static fragments (no imports or registry maintenance needed)
  • use <script server:setup> to define logic that runs on the server, which then gets stripped away

2. ./src/components/

  • custom element constructor files (only .js files for now)
  • all components are automatically registered using their file names; a hello-world.js component can be used as <hello-world>
  • static .html fragments; a my-header.html fragment can be directly used as <my-header>

3. ./routes/api/

  • file-based routing for REST API endpoints
  • e.g., ./routes/api/users.ts can be accessed via http://<domain>/api/users
  • TypeScript or JavaScript welcome!

McFly config

To tell McFly you want to use components, pass the mode (only "js" for now) to the components prop mcfly.config.ts

import defineConfig from "./packages/define-config";

export default defineConfig({
  components: "js",
});

More info

This framework is a result of an exploration for using Nitro and vanilla JS custom elements using a minimal Web Component Base class.

Nitro is the same production-grade web server powering Nuxt


Just keep building A project by Ayo Ayco

0.1.4

2 months ago

0.1.3

2 months ago

0.1.2

5 months ago

0.1.0

5 months ago

0.1.1

5 months ago

0.0.15

6 months ago

0.0.14

6 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

6 months ago

0.0.9

6 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago