mcfly/templates/basic
2023-10-24 13:13:01 +02:00
..
public feat(templates): update basic examples; remove prism 2023-10-21 23:46:24 +02:00
routes feat(templates): add REST API example on basic template 2023-10-24 13:13:01 +02:00
src fix(templates): remove unneeded css rule 2023-10-22 18:13:08 +02:00
.eslintignore feat: initial packages @mcflyjs/core, @templates/basic 2023-10-21 13:32:22 +02:00
.gitignore feat: initial packages @mcflyjs/core, @templates/basic 2023-10-21 13:32:22 +02:00
.npmrc feat: initial packages @mcflyjs/core, @templates/basic 2023-10-21 13:32:22 +02:00
mcfly.config.mjs refactor: all .ts to .js files 😱 2023-10-21 17:58:03 +02:00
nitro.config.mjs refactor: all .ts to .js files 😱 2023-10-21 17:58:03 +02:00
package.json chore(basic): remove unneeded template 2023-10-22 00:53:27 +02:00
README.md chore(templates): update basic readme 2023-10-22 00:44:41 +02:00
tsconfig.json feat: initial packages @mcflyjs/core, @templates/basic 2023-10-21 13:32:22 +02:00

McFly Starter Project

McFly is a no-framework framework that assists in leveraging the web platform.

npm create mcfly@latest

template-basic

Features

  • 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>

Commands

From the root of your project, you can run the following.

Command Result
npm start Start the dev server
npm run prepare Prepare the app
npm run build Locally generate the app's build files to ./output
npm run preview Preview the built app locally

More info

Check our website and GitHub