From f7a41de130a39eb8bf155bd50bbe74c2164c6382 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 21 Oct 2023 14:06:41 +0200 Subject: [PATCH] chore(landing-page): move all deps to app workspace --- app/.editorconfig | 15 +++++++ app/.eslintignore | 3 ++ app/.eslintrc | 5 +++ app/.gitignore | 7 +++ app/.npmrc | 2 + app/README.md | 42 ++++++++++++++++++ mcfly.config.ts => app/mcfly.config.ts | 0 nitro.config.ts => app/nitro.config.ts | 0 app/package.json | 31 +++++++++++++ {public => app/public}/favicon.ico | Bin {public => app/public}/morty.png | Bin {public => app/public}/prism.css | 0 {public => app/public}/prism.js | 0 {public => app/public}/reset.css | 0 {public => app/public}/robots.txt | 0 {routes => app/routes}/[...index].ts | 0 app/src/components/awesome-header.html | 15 +++++++ {src => app/src}/components/clickable-text.js | 0 {src => app/src}/components/code-block.js | 0 .../src}/components/ignored-different-type.ts | 0 {src => app/src}/components/my-footer.html | 0 {src => app/src}/components/my-head.html | 0 {src => app/src}/components/my-hello-world.js | 0 .../src}/components/vanilla-hello-world.js | 0 .../src}/components/warning-block.html | 0 {src => app/src}/pages/404.html | 0 {src => app/src}/pages/demo.html | 0 {src => app/src}/pages/demo/about.html | 0 {src => app/src}/pages/demo/about/index.html | 0 {src => app/src}/pages/demo/about/me.html | 0 {src => app/src}/pages/index.html | 0 app/tsconfig.json | 3 ++ package-lock.json | 17 +++++-- package.json | 17 +++---- packages/[...index].ts | 2 +- packages/_mcfly-plugin.ts | 2 +- templates/basic/routes/[...index].ts | 2 +- 37 files changed, 145 insertions(+), 18 deletions(-) create mode 100644 app/.editorconfig create mode 100644 app/.eslintignore create mode 100644 app/.eslintrc create mode 100644 app/.gitignore create mode 100644 app/.npmrc create mode 100644 app/README.md rename mcfly.config.ts => app/mcfly.config.ts (100%) rename nitro.config.ts => app/nitro.config.ts (100%) create mode 100644 app/package.json rename {public => app/public}/favicon.ico (100%) rename {public => app/public}/morty.png (100%) rename {public => app/public}/prism.css (100%) rename {public => app/public}/prism.js (100%) rename {public => app/public}/reset.css (100%) rename {public => app/public}/robots.txt (100%) rename {routes => app/routes}/[...index].ts (100%) create mode 100644 app/src/components/awesome-header.html rename {src => app/src}/components/clickable-text.js (100%) rename {src => app/src}/components/code-block.js (100%) rename {src => app/src}/components/ignored-different-type.ts (100%) rename {src => app/src}/components/my-footer.html (100%) rename {src => app/src}/components/my-head.html (100%) rename {src => app/src}/components/my-hello-world.js (100%) rename {src => app/src}/components/vanilla-hello-world.js (100%) rename {src => app/src}/components/warning-block.html (100%) rename {src => app/src}/pages/404.html (100%) rename {src => app/src}/pages/demo.html (100%) rename {src => app/src}/pages/demo/about.html (100%) rename {src => app/src}/pages/demo/about/index.html (100%) rename {src => app/src}/pages/demo/about/me.html (100%) rename {src => app/src}/pages/index.html (100%) create mode 100644 app/tsconfig.json diff --git a/app/.editorconfig b/app/.editorconfig new file mode 100644 index 0000000..4f4d652 --- /dev/null +++ b/app/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +[*.js] +indent_style = space +indent_size = 2 + +[{package.json,*.yml,*.cjson}] +indent_style = space +indent_size = 2 diff --git a/app/.eslintignore b/app/.eslintignore new file mode 100644 index 0000000..be2e4d2 --- /dev/null +++ b/app/.eslintignore @@ -0,0 +1,3 @@ +dist +.output +node-modules diff --git a/app/.eslintrc b/app/.eslintrc new file mode 100644 index 0000000..e14cbd6 --- /dev/null +++ b/app/.eslintrc @@ -0,0 +1,5 @@ +{ + "extends": [ + "@nuxtjs/eslint-config-typescript" + ] +} diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..eee04ce --- /dev/null +++ b/app/.gitignore @@ -0,0 +1,7 @@ +node_modules +*.log* +.nitro +.cache +.output +.env +dist \ No newline at end of file diff --git a/app/.npmrc b/app/.npmrc new file mode 100644 index 0000000..cf04042 --- /dev/null +++ b/app/.npmrc @@ -0,0 +1,2 @@ +shamefully-hoist=true +strict-peer-dependencies=false diff --git a/app/README.md b/app/README.md new file mode 100644 index 0000000..c35bcf0 --- /dev/null +++ b/app/README.md @@ -0,0 +1,42 @@ +# Nitro Minimal Starter + +Look at the [Nitro documentation](https://nitro.unjs.io/) to learn more. + +## Setup + +Make sure to install the dependencies: + +```bash +# npm +npm install + +# yarn +yarn install + +# pnpm +pnpm install +``` + +## Development Server + +Start the development server on + +```bash +npm run dev +``` + +## Production + +Build the application for production: + +```bash +npm run build +``` + +Locally preview production build: + +```bash +npm run preview +``` + +Check out the [deployment documentation](https://nitro.unjs.io/deploy) for more information. diff --git a/mcfly.config.ts b/app/mcfly.config.ts similarity index 100% rename from mcfly.config.ts rename to app/mcfly.config.ts diff --git a/nitro.config.ts b/app/nitro.config.ts similarity index 100% rename from nitro.config.ts rename to app/nitro.config.ts diff --git a/app/package.json b/app/package.json new file mode 100644 index 0000000..eb044cd --- /dev/null +++ b/app/package.json @@ -0,0 +1,31 @@ +{ + "name": "@mcflyjs/landing-page", + "description": "McFly is a full-stack no-framework framework that assists developers in leveraging the web platform.", + "private": true, + "scripts": { + "start": "nitropack dev", + "prepare": "nitropack prepare", + "dev": "nitropack dev", + "build": "nitropack build", + "preview": "node .output/server/index.mjs" + }, + "dependencies": { + "esprima": "^4.0.1", + "nitropack": "latest", + "ultrahtml": "^1.5.2" + }, + "version": "0.0.1", + "main": "index.js", + "devDependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/ayoayco/McFly.git", + "directory": "app" + }, + "author": "Ayo Ayco", + "license": "MIT", + "bugs": { + "url": "https://github.com/ayoayco/McFly/issues" + }, + "homepage": "https://github.com/ayoayco/McFly#readme" +} diff --git a/public/favicon.ico b/app/public/favicon.ico similarity index 100% rename from public/favicon.ico rename to app/public/favicon.ico diff --git a/public/morty.png b/app/public/morty.png similarity index 100% rename from public/morty.png rename to app/public/morty.png diff --git a/public/prism.css b/app/public/prism.css similarity index 100% rename from public/prism.css rename to app/public/prism.css diff --git a/public/prism.js b/app/public/prism.js similarity index 100% rename from public/prism.js rename to app/public/prism.js diff --git a/public/reset.css b/app/public/reset.css similarity index 100% rename from public/reset.css rename to app/public/reset.css diff --git a/public/robots.txt b/app/public/robots.txt similarity index 100% rename from public/robots.txt rename to app/public/robots.txt diff --git a/routes/[...index].ts b/app/routes/[...index].ts similarity index 100% rename from routes/[...index].ts rename to app/routes/[...index].ts diff --git a/app/src/components/awesome-header.html b/app/src/components/awesome-header.html new file mode 100644 index 0000000..c8086ad --- /dev/null +++ b/app/src/components/awesome-header.html @@ -0,0 +1,15 @@ +
+ +

McFly

+
+ Back to the Basics. Into the Future. +
diff --git a/src/components/clickable-text.js b/app/src/components/clickable-text.js similarity index 100% rename from src/components/clickable-text.js rename to app/src/components/clickable-text.js diff --git a/src/components/code-block.js b/app/src/components/code-block.js similarity index 100% rename from src/components/code-block.js rename to app/src/components/code-block.js diff --git a/src/components/ignored-different-type.ts b/app/src/components/ignored-different-type.ts similarity index 100% rename from src/components/ignored-different-type.ts rename to app/src/components/ignored-different-type.ts diff --git a/src/components/my-footer.html b/app/src/components/my-footer.html similarity index 100% rename from src/components/my-footer.html rename to app/src/components/my-footer.html diff --git a/src/components/my-head.html b/app/src/components/my-head.html similarity index 100% rename from src/components/my-head.html rename to app/src/components/my-head.html diff --git a/src/components/my-hello-world.js b/app/src/components/my-hello-world.js similarity index 100% rename from src/components/my-hello-world.js rename to app/src/components/my-hello-world.js diff --git a/src/components/vanilla-hello-world.js b/app/src/components/vanilla-hello-world.js similarity index 100% rename from src/components/vanilla-hello-world.js rename to app/src/components/vanilla-hello-world.js diff --git a/src/components/warning-block.html b/app/src/components/warning-block.html similarity index 100% rename from src/components/warning-block.html rename to app/src/components/warning-block.html diff --git a/src/pages/404.html b/app/src/pages/404.html similarity index 100% rename from src/pages/404.html rename to app/src/pages/404.html diff --git a/src/pages/demo.html b/app/src/pages/demo.html similarity index 100% rename from src/pages/demo.html rename to app/src/pages/demo.html diff --git a/src/pages/demo/about.html b/app/src/pages/demo/about.html similarity index 100% rename from src/pages/demo/about.html rename to app/src/pages/demo/about.html diff --git a/src/pages/demo/about/index.html b/app/src/pages/demo/about/index.html similarity index 100% rename from src/pages/demo/about/index.html rename to app/src/pages/demo/about/index.html diff --git a/src/pages/demo/about/me.html b/app/src/pages/demo/about/me.html similarity index 100% rename from src/pages/demo/about/me.html rename to app/src/pages/demo/about/me.html diff --git a/src/pages/index.html b/app/src/pages/index.html similarity index 100% rename from src/pages/index.html rename to app/src/pages/index.html diff --git a/app/tsconfig.json b/app/tsconfig.json new file mode 100644 index 0000000..43008af --- /dev/null +++ b/app/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "./.nitro/types/tsconfig.json" +} diff --git a/package-lock.json b/package-lock.json index e5fadf1..effb5a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,13 +8,20 @@ "packages/config", "packages/create-mcfly", "templates/basic", - "packages/core" - ], + "packages/core", + "app" + ] + }, + "app": { + "name": "@mcflyjs/landing-page", + "version": "0.0.1", + "license": "MIT", "dependencies": { "esprima": "^4.0.1", "nitropack": "latest", "ultrahtml": "^1.5.2" - } + }, + "devDependencies": {} }, "node_modules/@cloudflare/kv-asset-handler": { "version": "0.3.0", @@ -446,6 +453,10 @@ "resolved": "packages/core", "link": true }, + "node_modules/@mcflyjs/landing-page": { + "resolved": "app", + "link": true + }, "node_modules/@netlify/functions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-2.3.0.tgz", diff --git a/package.json b/package.json index 371b463..e00fb71 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,15 @@ { "private": true, "scripts": { - "start": "nitropack dev", - "prepare": "nitropack prepare", - "dev": "nitropack dev", - "build": "nitropack build", - "preview": "node .output/server/index.mjs", - "build:preview": "npm run build && npm run preview" - }, - "dependencies": { - "esprima": "^4.0.1", - "nitropack": "latest", - "ultrahtml": "^1.5.2" + "start": "npm start -w @mcflyjs/landing-page", + "build": "npm run build -w @mcflyjs/landing-page", + "build:preview": "npm run build:preview -w @mcflyjs/landing-page" }, "workspaces": [ "packages/config", "packages/create-mcfly", "templates/basic", - "packages/core" + "packages/core", + "app" ] } diff --git a/packages/[...index].ts b/packages/[...index].ts index 6d824a0..d5d724c 100644 --- a/packages/[...index].ts +++ b/packages/[...index].ts @@ -4,7 +4,7 @@ import { ELEMENT_NODE, parse, render, renderSync, walkSync } from "ultrahtml"; import { parseScript } from "esprima"; -import config from "../mcfly.config"; +import config from "../app/mcfly.config"; const { components: componentType } = config(); diff --git a/packages/_mcfly-plugin.ts b/packages/_mcfly-plugin.ts index 852ad8d..7b9d7e9 100644 --- a/packages/_mcfly-plugin.ts +++ b/packages/_mcfly-plugin.ts @@ -1,5 +1,5 @@ import { NitroApp } from "nitropack"; -import config from "../mcfly.config"; +import config from "../app/mcfly.config"; export default defineNitroPlugin((event: NitroApp) => { const { onBuild } = config(); diff --git a/templates/basic/routes/[...index].ts b/templates/basic/routes/[...index].ts index 5d4b1ae..31d4010 100644 --- a/templates/basic/routes/[...index].ts +++ b/templates/basic/routes/[...index].ts @@ -4,7 +4,7 @@ import { ELEMENT_NODE, parse, render, renderSync, walkSync } from "ultrahtml"; import { parseScript } from "esprima"; -import config from "../../../mcfly.config"; +import config from "../../../app/mcfly.config"; const { components: componentType } = config();