Skip to content

Commit

Permalink
feat(nuxt-app): add nuxt example
Browse files Browse the repository at this point in the history
  • Loading branch information
oktaysenkan committed Oct 5, 2024
1 parent 25856d1 commit 58a7a64
Show file tree
Hide file tree
Showing 10 changed files with 5,420 additions and 2,893 deletions.
22 changes: 22 additions & 0 deletions apps/nuxt-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store

# Local env files
.env
.env.*
!.env.example
27 changes: 27 additions & 0 deletions apps/nuxt-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Getting Started

First, run the development server:

```bash
pnpm dev
```

Open [http://localhost:3001](http://localhost:3001) with your browser to see the result.

You can start editing the page by modifying `app.vue`. The page auto-updates as you edit the file.

To create [API routes](https://nuxt.com/docs/guide/directory-structure/server), add an `api/` or a `routes` directory to the `server/` directory and create `your-file.ts` which will contain your api logic. Like `server/api/hello.ts` would map to [http://localhost:3001/api/hello](http://localhost:3001/api/hello).

> See the guide for more details -> [directory-structure/server](https://nuxt.com/docs/guide/directory-structure/server)
## Learn More

To learn more about Next.js, take a look at the following resources:

- [NuxtJs Official documentation](https://nuxt.com/docs/getting-started/introduction) - learn about Nuxt to create production-grade full-stack web apps and websites features and API.

## Deploy on Vercel

You can easily deploy your Nuxt app by using the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme).

Check out our [Nuxt deployment documentation](https://vercel.com/docs/frameworks/nuxt) for more details.
34 changes: 34 additions & 0 deletions apps/nuxt-app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<script setup lang="ts">
import { Iconify } from "@oktaytest/vue";
useHead({
title: "Nuxt App",
meta: [{ name: "description", content: "Generated by create turbo" }],
});
</script>

<template>
<main>
<Iconify name="mdi:home" :size="24" />
<Iconify name="logos:active-campaign" />
<Iconify name="logos:apache-superset-icon" />
<Iconify name="invalid:icon" />
</main>
</template>

<style>
html,
body {
margin: 0;
padding: 0;
}
main {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #242424;
color: rgba(255, 255, 255, 0.87);
}
</style>
17 changes: 17 additions & 0 deletions apps/nuxt-app/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default defineNuxtConfig({
devtools: { enabled: true },
compatibilityDate: "2024-10-05",
modules: ["@oktaytest/nuxt"],
iconify: {
icons: [
"mdi:home",
"mdi:account",
"mdi:account-badge-outline",
"feather:activity",
"feather:alert-circle",
"logos:active-campaign",
"logos:apache-superset-icon",
],
outputFileName: "nuxt",
},
});
25 changes: 25 additions & 0 deletions apps/nuxt-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "@oktaytest/nuxt-app",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev --port 3001",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"lint": "eslint ."
},
"dependencies": {
"@oktaytest/nuxt": "*"
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"eslint": "^8.57.0",
"nuxt": "^3.13.2",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
}
}
Binary file added apps/nuxt-app/public/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions apps/nuxt-app/server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
}
4 changes: 4 additions & 0 deletions apps/nuxt-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
6 changes: 6 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"rspack#build": {
"dependsOn": ["core#build", "webpack#build"]
},
"nuxt#build": {
"dependsOn": ["core#build"]
},

"native#build": {
"dependsOn": [
Expand All @@ -60,6 +63,9 @@
"vite-vue#build": {
"dependsOn": ["vite#build", "vue#build"]
},
"nuxt-app#build": {
"dependsOn": ["nuxt#build"]
},

"dev": {
"cache": false,
Expand Down
Loading

0 comments on commit 58a7a64

Please sign in to comment.