feat(create-mcfly): generate from basic template

This commit is contained in:
Ayo 2023-10-21 20:25:50 +02:00
parent 93fdbcd09e
commit 90fe47c352
5 changed files with 34 additions and 18 deletions

1
.gitignore vendored
View file

@ -8,3 +8,4 @@ dist
*~
*swp
*swo
mcfly-app

View file

@ -12,12 +12,21 @@
<a href="https://mc-fly.vercel.app/demo" target="_blank"><img src="https://img.shields.io/badge/see-the_demo_↗-blue?style=flat&colorB=28CF8D" /></a>
</p>
## Installation
Run the following to generate a McFly starter project:
```
npm create mcfly@latest
```
## 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
The time has come for vanilla Web tech to be great again. 🎉
✅ Create web apps with vanilla custom elements<br>
✅ Write real .HTML files<br>
✅ Have no frameworks or reactivity libraries on the browser<br>
✅ Use server-side rendering<br>
✅ Deploy anywhere<br>
## Special directories
**1. `src/pages`**

8
package-lock.json generated
View file

@ -3977,12 +3977,14 @@
}
},
"packages/create-mcfly": {
"version": "0.0.5",
"version": "0.1.0",
"license": "MIT",
"dependencies": {
"giget": "^1.1.3"
},
"bin": {
"create-mcfly": "index.js"
},
"devDependencies": {}
}
},
"site": {
"name": "@mcflyjs/landing-page",

View file

@ -1,12 +1,14 @@
#!/usr/bin/env node
const fs = require("fs");
const args = process.argv;
const { downloadTemplate } = require("giget");
create();
function create() {
console.log("Create a new McFly app!");
console.log("See project details: https://ayco.io/gh/McFly#readme");
async function create() {
const { source, dir } = await downloadTemplate(
"github:ayoayco/mcfly/templates/basic",
{
dir: "mcfly-app",
}
);
console.log(`✨ New McFly app created: ${dir}`);
return 1;
}

View file

@ -1,6 +1,6 @@
{
"name": "create-mcfly",
"version": "0.0.5",
"version": "0.1.0",
"bin": {
"create-mcfly": "./index.js"
},
@ -12,7 +12,6 @@
"files": [
"index.js"
],
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
@ -26,5 +25,8 @@
"bugs": {
"url": "https://github.com/ayoayco/McFly/issues"
},
"homepage": "https://github.com/ayoayco/McFly#readme"
"homepage": "https://github.com/ayoayco/McFly#readme",
"dependencies": {
"giget": "^1.1.3"
}
}