From 0148947a186b2b1f55dd1a5495bda45a7741135e Mon Sep 17 00:00:00 2001 From: Qin Guan Date: Fri, 1 Sep 2023 19:54:12 +0800 Subject: [PATCH] chore: initial commit --- .editorconfig | 15 +++++++++++++++ .eslintignore | 3 +++ .eslintrc | 5 +++++ .gitignore | 7 +++++++ .npmrc | 2 ++ README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ nitro.config.ts | 2 ++ package.json | 12 ++++++++++++ routes/index.ts | 3 +++ tsconfig.json | 3 +++ 10 files changed, 94 insertions(+) create mode 100644 .editorconfig create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 README.md create mode 100644 nitro.config.ts create mode 100644 package.json create mode 100644 routes/index.ts create mode 100644 tsconfig.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4f4d652 --- /dev/null +++ b/.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/.eslintignore b/.eslintignore new file mode 100644 index 0000000..be2e4d2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +dist +.output +node-modules diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..e14cbd6 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,5 @@ +{ + "extends": [ + "@nuxtjs/eslint-config-typescript" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eee04ce --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +node_modules +*.log* +.nitro +.cache +.output +.env +dist \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..cf04042 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +shamefully-hoist=true +strict-peer-dependencies=false diff --git a/README.md b/README.md new file mode 100644 index 0000000..c35bcf0 --- /dev/null +++ b/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/nitro.config.ts b/nitro.config.ts new file mode 100644 index 0000000..dde99bb --- /dev/null +++ b/nitro.config.ts @@ -0,0 +1,2 @@ +//https://nitro.unjs.io/config +export default defineNitroConfig({}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..8565879 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "private": true, + "scripts": { + "prepare": "nitropack prepare", + "dev": "nitropack dev", + "build": "nitropack build", + "preview": "node .output/server/index.mjs" + }, + "dependencies": { + "nitropack": "latest" + } +} diff --git a/routes/index.ts b/routes/index.ts new file mode 100644 index 0000000..514e9f1 --- /dev/null +++ b/routes/index.ts @@ -0,0 +1,3 @@ +export default eventHandler(() => { + return { nitro: 'Is Awesome!' } +}) diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..43008af --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "./.nitro/types/tsconfig.json" +}