feat(create-mcfly): generate from basic template
This commit is contained in:
parent
93fdbcd09e
commit
90fe47c352
5 changed files with 34 additions and 18 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,3 +8,4 @@ dist
|
||||||
*~
|
*~
|
||||||
*swp
|
*swp
|
||||||
*swo
|
*swo
|
||||||
|
mcfly-app
|
||||||
|
|
19
README.md
19
README.md
|
@ -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>
|
<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>
|
</p>
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Run the following to generate a McFly starter project:
|
||||||
|
```
|
||||||
|
npm create mcfly@latest
|
||||||
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Create web apps with vanilla custom elements
|
The time has come for vanilla Web tech to be great again. 🎉
|
||||||
- Write real .HTML files
|
|
||||||
- Have no frameworks or reactivity libraries on the browser
|
✅ Create web apps with vanilla custom elements<br>
|
||||||
- Use server-side rendering
|
✅ Write real .HTML files<br>
|
||||||
- Deploy anywhere
|
✅ Have no frameworks or reactivity libraries on the browser<br>
|
||||||
|
✅ Use server-side rendering<br>
|
||||||
|
✅ Deploy anywhere<br>
|
||||||
|
|
||||||
## Special directories
|
## Special directories
|
||||||
**1. `src/pages`**
|
**1. `src/pages`**
|
||||||
|
|
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -3977,12 +3977,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"packages/create-mcfly": {
|
"packages/create-mcfly": {
|
||||||
"version": "0.0.5",
|
"version": "0.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"giget": "^1.1.3"
|
||||||
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-mcfly": "index.js"
|
"create-mcfly": "index.js"
|
||||||
},
|
}
|
||||||
"devDependencies": {}
|
|
||||||
},
|
},
|
||||||
"site": {
|
"site": {
|
||||||
"name": "@mcflyjs/landing-page",
|
"name": "@mcflyjs/landing-page",
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const fs = require("fs");
|
const { downloadTemplate } = require("giget");
|
||||||
const args = process.argv;
|
|
||||||
|
|
||||||
create();
|
create();
|
||||||
|
async function create() {
|
||||||
function create() {
|
const { source, dir } = await downloadTemplate(
|
||||||
console.log("Create a new McFly app!");
|
"github:ayoayco/mcfly/templates/basic",
|
||||||
console.log("See project details: https://ayco.io/gh/McFly#readme");
|
{
|
||||||
|
dir: "mcfly-app",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
console.log(`✨ New McFly app created: ${dir}`);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "create-mcfly",
|
"name": "create-mcfly",
|
||||||
"version": "0.0.5",
|
"version": "0.1.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"create-mcfly": "./index.js"
|
"create-mcfly": "./index.js"
|
||||||
},
|
},
|
||||||
|
@ -12,7 +12,6 @@
|
||||||
"files": [
|
"files": [
|
||||||
"index.js"
|
"index.js"
|
||||||
],
|
],
|
||||||
"devDependencies": {},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
@ -26,5 +25,8 @@
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/ayoayco/McFly/issues"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue