refactor(templates): clean up basic template
This commit is contained in:
parent
c74421ccb0
commit
8e265925ac
7 changed files with 10 additions and 40 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,10 +1,10 @@
|
|||
dist
|
||||
node_modules
|
||||
*.log*
|
||||
.nitro
|
||||
.cache
|
||||
.output
|
||||
.env
|
||||
dist
|
||||
*~
|
||||
*swp
|
||||
*swo
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -4000,7 +4000,7 @@
|
|||
}
|
||||
},
|
||||
"packages/create-mcfly": {
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"consola": "^3.2.3",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
dist
|
||||
.output
|
||||
node-modules
|
||||
.output
|
||||
|
|
5
templates/basic/.gitignore
vendored
5
templates/basic/.gitignore
vendored
|
@ -1,7 +1,10 @@
|
|||
dist
|
||||
node_modules
|
||||
*.log*
|
||||
.nitro
|
||||
.cache
|
||||
.output
|
||||
.env
|
||||
dist
|
||||
*~
|
||||
*swp
|
||||
*swo
|
|
@ -1,14 +1,11 @@
|
|||
# McFly Starter Project
|
||||
|
||||
|
||||

|
||||
|
||||
## Background
|
||||
This project was generated from the basic template for **McFly** -- a no-framework framework that assists in leveraging the web platform.
|
||||
|
||||
```
|
||||
npm create mcfly@latest
|
||||
```
|
||||

|
||||
|
||||
It contains example files to get you started using vanilla web technologies in a modern way. See the [Special Directories](#special-directories) section for more information.
|
||||
|
||||
|
@ -61,11 +58,6 @@ The following commands are available to you on this project. Add more, or modify
|
|||
| npm 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.unjs.io) and vanilla JS custom elements using a minimal [**Web Component Base**](https://ayco.io/n/web-component-base) class.
|
||||
|
||||
**Nitro** is the same production-grade web server powering [**Nuxt**](https://nuxt.com/)
|
||||
|
||||
---
|
||||
*Just keep building*<br />
|
||||
*A project by [Ayo Ayco](https://ayco.io)*
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
import McFly from "@mcflyjs/config";
|
||||
|
||||
export default defineNitroConfig({ ...McFly() });
|
||||
|
|
|
@ -3,40 +3,21 @@
|
|||
<!--
|
||||
Hello! This page is an example McFly page.
|
||||
See more on https://ayco.io/gh/McFly
|
||||
|
||||
<my-head> here is a static HTML fragment found in ./components/my-head.html
|
||||
you can reuse it to have the same <head> on every page
|
||||
any children will be inserted into the <slot /> on the fragment
|
||||
-->
|
||||
<my-head>
|
||||
<script server:setup>
|
||||
/**
|
||||
* This server:setup script block will get evaluated on the server
|
||||
* ...then get stripped away, leaving just the HTML
|
||||
* */
|
||||
const name = "McFly";
|
||||
const author = "Ayo Ayco";
|
||||
</script>
|
||||
</my-head>
|
||||
<body>
|
||||
<!--
|
||||
This element below is a static HTML fragment, found in ./components/awesome-header.html
|
||||
-->
|
||||
<awesome-header></awesome-header>
|
||||
<main>
|
||||
<!--
|
||||
any variable declared in a server:setup script can be used on the page
|
||||
-->
|
||||
<h2>Welcome to {{name}}</h2>
|
||||
|
||||
<p>
|
||||
Here's a vanilla custom element:
|
||||
<vanilla-hello-world data-name="{{name}}" />
|
||||
</p>
|
||||
|
||||
<!--
|
||||
this is just a code-block element, found in ./components/code-block.js
|
||||
(not an actual JS code)
|
||||
-->
|
||||
<code-block language="js">
|
||||
<pre>
|
||||
class HelloWorld extends HTMLElement {
|
||||
|
@ -60,13 +41,8 @@ class HelloWorld extends HTMLElement {
|
|||
>
|
||||
</code-block>
|
||||
</main>
|
||||
|
||||
<!--
|
||||
Here's another static .html fragment, found in ./components/my-footer.html
|
||||
The child <small> element gets inserted into the <slot /> on the fragment
|
||||
-->
|
||||
<my-footer>
|
||||
<small>A project by <a href="https://ayo.ayco.io">Ayo Ayco</a></small>
|
||||
<small>A project by <a href="https://ayco.io">{{author}}</a></small>
|
||||
</my-footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue