Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit 9cecb80

Browse files
authored
feat: support for project option (#152)
1 parent 17dce1c commit 9cecb80

35 files changed

+3081
-3586
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": [
3-
"@nuxtjs/eslint-config-typescript"
3+
"@nuxt/eslint-config"
44
],
55
"rules": {
66
"@typescript-eslint/no-unused-vars": "off",

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
shamefully-hoist=true
2+
strict-peer-dependencies=false

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": true
3+
"source.fixAll.eslint": "explicit"
44
},
55
"files.associations": {
66
"*.css": "postcss"

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Official module of [Nuxt Studio](https://nuxt.studio).
1010

11-
A new experience to build website with [Nuxt](https://nuxt.com) and [Nuxt Content](https://content.nuxt.com/).
11+
Edit your websites made with [Nuxt Content](https://content.nuxt.com/), in production on any device.
1212

1313
📖  Official [Documentation](https://nuxt.studio/docs/projects/setup#requirements-to-use-the-studio-editor)
1414

@@ -20,13 +20,20 @@ A new experience to build website with [Nuxt](https://nuxt.com) and [Nuxt Conten
2020

2121
## Installation
2222

23+
Install the dependency to you project:
24+
2325
```bash
26+
# NPM
27+
npm install --save-dev @nuxthq/studio
28+
# Yarn
2429
yarn add --dev @nuxthq/studio
30+
# pnpm
31+
pnpm add --save-dev @nuxthq/studio
2532
```
2633

2734
Then, register the module in your `nuxt.config.ts`:
2835

29-
```js
36+
```ts
3037
export default defineNuxtConfig({
3138
modules: [
3239
'@nuxthq/studio'
@@ -47,8 +54,9 @@ STUDIO_API=http://localhost:{PORT}
4754

4855
### Development
4956

50-
- Run `yarn install` to install dependencies.
51-
- Run `yarn dev` to start the dev server using [`playground/`](./playground/) as the project.
57+
- Run `pnpm i` to install dependencies.
58+
- Run `pnpm dev:prepare` to prepare the module in development mode.
59+
- Run `pnpm dev` to start the dev server using [`playground/`](./playground/) as the project.
5260
- Visit http://localhost:3000/
5361

5462
## License

package.json

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "@nuxthq/studio",
3+
"description": "Nuxt Studio is a visual editor for content-driven Nuxt application with Markdown.",
34
"version": "1.0.6",
45
"repository": "nuxtlabs/studio-module",
56
"homepage": "https://nuxt.studio",
67
"packageManager": "pnpm@8.10.0",
78
"keywords": [
89
"nuxt",
9-
"studio"
10+
"studio",
11+
"nuxtcms",
12+
"nuxtcontent"
1013
],
1114
"license": "MIT",
1215
"files": [
@@ -29,37 +32,34 @@
2932
"main": "./dist/module.cjs",
3033
"types": "./dist/types.d.ts",
3134
"scripts": {
32-
"prepare": "nuxt prepare playground",
33-
"dev": "NUXT_STUDIO_DEV_PROXY=true nuxt dev playground",
34-
"build": "nuxt-module-build",
35-
"lint": "eslint --ext .vue,.ts,.js,.mjs .",
35+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
36+
"dev": "nuxt dev playground --tunnel",
37+
"build": "nuxt-module-build build",
38+
"lint": "eslint .",
3639
"prepack": "pnpm lint && pnpm build",
3740
"release": "pnpm lint && release-it",
3841
"pre:release": "pnpm lint && release-it --preRelease"
3942
},
4043
"dependencies": {
41-
"@nuxt/kit": "^3.8.0",
44+
"@nuxt/kit": "^3.9.0",
4245
"defu": "^6.1.3",
4346
"nuxt-component-meta": "^0.6.0",
44-
"nuxt-config-schema": "^0.4.6",
45-
"socket.io-client": "^4.7.2",
46-
"ufo": "^1.3.1"
47+
"socket.io-client": "^4.7.3",
48+
"ufo": "^1.3.2"
4749
},
4850
"devDependencies": {
49-
"@nuxt-themes/alpine": "^1.6.4",
50-
"@nuxt-themes/elements": "0.9.5",
51-
"@nuxt/content": "^2.9.0",
52-
"@nuxt/module-builder": "^0.5.2",
53-
"@nuxt/schema": "^3.8.0",
54-
"@nuxtjs/color-mode": "^3.3.0",
55-
"@nuxtjs/eslint-config-typescript": "^12.1.0",
56-
"@types/node": "^20.8.9",
57-
"eslint": "^8.52.0",
58-
"jiti": "^1.20.0",
59-
"nuxt": "^3.8.0",
60-
"pinceau": "^0.20.1",
61-
"release-it": "^16.2.1",
62-
"typescript": "^5.2.2"
51+
"@nuxt/content": "^2.10.0",
52+
"@nuxt/eslint-config": "^0.2.0",
53+
"@nuxt/image": "^1.1.0",
54+
"@nuxt/module-builder": "^0.5.5",
55+
"@nuxt/schema": "^3.9.0",
56+
"@nuxt/ui-pro": "^0.6.1",
57+
"@types/node": "^20.10.6",
58+
"consola": "^3.2.3",
59+
"eslint": "^8.56.0",
60+
"nuxt": "^3.9.0",
61+
"release-it": "^17.0.1",
62+
"typescript": "^5.3.3"
6363
},
6464
"release-it": {
6565
"git": {
@@ -76,7 +76,6 @@
7676
"vue": "*"
7777
},
7878
"ignoreMissing": [
79-
"prosemirror-*",
8079
"@babel/core",
8180
"webpack",
8281
"axios",

playground/.studio/app.config.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

playground/.studio/tokens.config.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

playground/app.config.ts

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,3 @@
11
export default defineAppConfig({
2-
// @ts-ignore
3-
alpine: {
4-
title: 'Alpine',
5-
description: 'The minimalist blog theme',
6-
image: {
7-
src: '/social-card-preview.png',
8-
alt: 'An image showcasing my project.',
9-
width: 400,
10-
height: 300
11-
},
12-
header: {
13-
position: 'right', // possible value are : | 'left' | 'center' | 'right'
14-
logo: {
15-
path: '/logo.svg', // path of the logo
16-
pathDark: '/logo-dark.svg', // path of the logo in dark mode, leave this empty if you want to use the same logo
17-
alt: 'alpine' // alt of the logo
18-
}
19-
},
20-
footer: {
21-
credits: {
22-
enabled: true, // possible value are : true | false
23-
repository: 'https://www.github.com/nuxt-themes/alpine' // our github repository
24-
},
25-
navigation: true, // possible value are : true | false
26-
alignment: 'center', // possible value are : 'none' | 'left' | 'center' | 'right'
27-
message: 'Follow me on' // string that will be displayed in the footer (leave empty or delete to disable)
28-
},
29-
socials: {
30-
twitter: 'nuxtlabs',
31-
instagram: 'atinuxt',
32-
// @ts-ignore
33-
linkedin: {
34-
icon: 'uil:linkedin',
35-
label: 'LinkedIn',
36-
href: 'https://www.linkedin.com/company/nuxtlabs'
37-
}
38-
},
39-
form: {
40-
successMessage: 'Message sent. Thank you!'
41-
}
42-
}
2+
433
})

playground/app.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script setup>
2+
const appConfig = useAppConfig()
3+
const { data: navigation } = useAsyncData('navigation', () => fetchContentNavigation())
4+
</script>
5+
6+
<template>
7+
<UHeader
8+
:title="appConfig.title"
9+
:links="mapContentNavigation(navigation)"
10+
/>
11+
<UMain>
12+
<UContainer>
13+
<NuxtPage />
14+
</UContainer>
15+
</UMain>
16+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
const appConfig = useAppConfig()
3+
</script>
4+
5+
<template>
6+
<pre>{{ appConfig }}</pre>
7+
</template>

0 commit comments

Comments
 (0)