Skip to content

Commit

Permalink
chore(common): restructure starters and update root readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjae-lee committed Jan 30, 2024
1 parent ea39f73 commit af80bd2
Show file tree
Hide file tree
Showing 114 changed files with 73 additions and 126 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ This repository is a collection of starters to help developers quickly start bui
## Introduction
Inside each project you will find a detailed README.md file that will provide instructions on how to clone and run the code. Here is a short list of all projects inside of this repository:

- [Story starter](story-starter/README.md)
- [Tool Next.js Starter](tool-nextjs-starter/README.md)
- Space Plugins
- [Nuxt Starter](space-plugins/nuxt-starter/README.md)
- [Story Starter](space-plugins/story-starter/README.md)
- Tool Plugins
- [Next.js Starter](tool-plugins/nextjs-starter/README.md)

## Glossary

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `space-plugin-nuxt-base` layer
# Space Plugin `nuxt-base` layer

This Nuxt layer adds basic authentication flow to your existing Storyblok's Space Plugin app.

Expand All @@ -8,7 +8,12 @@ In your `nuxt.config.ts`,

```js
export default defineNuxtConfig({
extends: ['github:storyblok/space-tool-plugins/space-plugin-nuxt-base'],
extends: [
[
'github:storyblok/space-tool-plugins/space-plugins/nuxt-base',
{ install: true },
],
],
});
```

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This Nuxt starter is a Storyblok Space Plugin app that includes the basic authen
## Getting Started

```sh
npx giget@latest gh:storyblok/space-tool-plugins/space-plugin-nuxt-starter YOUR-PROJECT-NAME
npx giget@latest gh:storyblok/space-tool-plugins/space-plugins/nuxt-starter YOUR-PROJECT-NAME
```

This repository is developed using [pnpm](https://pnpm.io/). However, you can also use Yarn or NPM.
Expand Down Expand Up @@ -36,7 +36,7 @@ And then you can find the information.

<img src="./docs/oauth.png" alt="OAuth information" width="600" />

3. Configure the following environment variables in `<ROOT-OF-YOUR-PROJECT>/starters/nuxt/.env`.
3. Configure the following environment variables in `<ROOT-OF-YOUR-PROJECT>/.env`.

- `CLIENT_ID=`: Client Identifer
- `CLIENT_SECRET=`: Client Secret
Expand All @@ -58,10 +58,6 @@ Ensure that "Production" is the section that contains information about the prod

7. Open the `starters/nuxt/stories.config.ts` file and implement your own actions. You can refer to the existing sample implementation for guidance.

8. Deploying

The starter is set up as a monorepo, and most hosting platforms support it seamlessly. For instance, Vercel recognizes it as a Nuxt project and automatically configures the root directory for you.

<img src="./docs/deploy-subdir.png" alt="Vercel Deployment" width="600" />
8. Deployment

You should configure the same environment variables on the hosting platform as well.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
extends: ['github:storyblok/space-tool-plugins/space-plugin-nuxt-base'],
extends: [
[
'github:storyblok/space-tool-plugins/space-plugins/nuxt-base',
{ install: true },
],
],
css: ['~/assets/css/base.css'],
modules: ['nuxt-lucide-icons', '@nuxtjs/google-fonts', '@nuxtjs/tailwindcss'],
googleFonts: {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions space-plugins/story-starter/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CLIENT_ID=vJ1V0FP0ybrcu+QhvL2uCw==
CLIENT_SECRET=Uxswx2A1s6CH5wT3WS3EmoRvFFd0zGeIKBbjg2dMcRd2lcg7ge1zA662X+9Ymusw+pbgEQRk80Jt5C5gkGcdew==
BASE_URL=https://eunjae.eu.ngrok.io
File renamed without changes.
6 changes: 6 additions & 0 deletions space-plugins/story-starter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
.env.*
!.env.example

.idea
**/node_modules
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ npx giget@latest gh:storyblok/space-tool-plugins/story-starter YOUR-PROJECT-NAME
```

To learn more about the configuration, read the [space-plugin-nuxt-starter's README](https://github.com/storyblok/space-tool-plugins/blob/main/space-plugin-nuxt-starter/README.md#configuration).

## Deployment

The starter is set up as a monorepo, and most hosting platforms support it seamlessly. For instance, Vercel recognizes it as a Nuxt project and automatically configures the root directory for you.

<img src="./docs/deploy-subdir.png" alt="Vercel Deployment" width="600" />
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "",
"private": true,
"workspaces": [
"starters/*",
"packages/*"
"starters/*"
],
"scripts": {
"dev:nuxt": "pnpm -F nuxt dev"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions space-plugins/story-starter/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- 'starters/*'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
extends: ['github:storyblok/space-tool-plugins/space-plugin-nuxt-base'],
extends: [
[
'github:storyblok/space-tool-plugins/space-plugins/nuxt-base',
{ install: true },
],
],
// extends: [['../../../nuxt-base', { install: true }]],
css: ['~/assets/css/main.css'],
modules: ['nuxt-lucide-icons', '@nuxtjs/google-fonts', '@nuxtjs/tailwindcss'],
googleFonts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"dev": "nuxt dev --dotenv ../../.env",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"generate": "nuxt generate",
Expand All @@ -15,7 +15,6 @@
"dependencies": {
"@storyblok/app-extension-auth": "1.0.0-alpha.1",
"@types/nprogress": "^0.2.3",
"common": "workspace:*",
"nprogress": "^0.2.0",
"storyblok-js-client": "^6.2.0",
"valibot": "^0.19.0"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions story-starter/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions story-starter/packages/common/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions story-starter/packages/common/src/hello.vue

This file was deleted.

2 changes: 0 additions & 2 deletions story-starter/packages/common/src/index.ts

This file was deleted.

13 changes: 0 additions & 13 deletions story-starter/packages/common/tsconfig.json

This file was deleted.

4 changes: 0 additions & 4 deletions story-starter/pnpm-workspace.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit af80bd2

Please sign in to comment.