From b32fb6be985c88c58e3cc4f89b0329786b37896e Mon Sep 17 00:00:00 2001 From: Roberto Butti Date: Thu, 11 Apr 2024 22:33:51 +0200 Subject: [PATCH 1/2] chore: updating frameworks config - remove Nuxt.js 2 - rename Nuxt.js 3 to Nuxt - rename React.js to React - rename Vue.js to Vue - rename Gatsby.js to Gatsby - integrate Gatsby UT - integrate Vue and React 5 min repositories - add Remix UT --- README.md | 8 ++++---- src/commands/default.ts | 7 ++++--- src/lib/frameworks.ts | 38 ++++++++++++++++++-------------------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index be48acd..c30548a 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@

A CLI to quickly start a project with your favorite framework, already set up with Storyblok, Headless CMS.


Supports Next.js, - Nuxt.js (2 & 3), - Gatsby.js, - Vue.js, - React.js, + Nuxt, + Gatsby, + Vue, + React, Astro, Remix, and SvelteKit

diff --git a/src/commands/default.ts b/src/commands/default.ts index ff7b5ec..0616be7 100644 --- a/src/commands/default.ts +++ b/src/commands/default.ts @@ -161,8 +161,9 @@ export default class CreateStoryblokAppCommand extends Command { submodules: submodules, }) directoryTempCreated = true - - fs.rmSync(`./temp-started/${framework}/.git`, {recursive: true}) + try { + fs.rmSync(`./temp-started/${framework}/.git`, {recursive: true}) + } catch {} const readmeContent = ` # Storyblok quick starter project @@ -237,7 +238,7 @@ In the folder you have some files like: log('') log( chalkSb( - 'You need to setup mkcert to use the visual editor in the app: ', + 'You need to setup mkcert to use the Visual Editor in the app: ', ), ) log('') diff --git a/src/lib/frameworks.ts b/src/lib/frameworks.ts index 5924166..35512df 100644 --- a/src/lib/frameworks.ts +++ b/src/lib/frameworks.ts @@ -31,7 +31,7 @@ export interface Framework { const frameworks = [ { - name: 'Vue.js', + name: 'Vue', value: 'vuejs', start: 'dev', token: 'd6IKUtAUDiKyAhpJtrLFcwtt', @@ -39,20 +39,11 @@ const frameworks = [ bridge: 'src/pages/Home.vue', public: 'public', port: '3000', + tutorialLink: 'https://www.storyblok.com/tp/add-a-headless-CMS-to-vuejs-in-5-minutes' }, { - name: 'Nuxt.js 2', - value: 'nuxtjs', - start: 'dev', - token: 'd6IKUtAUDiKyAhpJtrLFcwtt', - config: 'nuxt.config.js', - bridge: 'pages/_.vue', - public: 'static', - port: '3000', - }, - { - name: 'Nuxt.js 3', - value: 'nuxtjs-3', + name: 'Nuxt', + value: 'nuxt', start: 'dev-ssl', token: 'W1vLyxT5rQ15jBpANjnv0gtt', config: 'nuxt.config.js', @@ -76,8 +67,8 @@ const frameworks = [ repositoryUrl: 'https://github.com/storyblok/next.js-ultimate-tutorial.git', }, { - name: 'React.js', - value: 'reactjs', + name: 'React', + value: 'react', start: 'start', token: 'W1vLyxT5rQ15jBpANjnv0gtt', config: 'src/index.js', @@ -86,16 +77,20 @@ const frameworks = [ port: '3000', branch: 'master', repositoryUrl: 'https://github.com/storyblok/storyblok-react-boilerplate.git', + tutorialLink: 'https://www.storyblok.com/tp/headless-cms-react', }, { name: 'Remix', value: 'remix', start: 'dev', token: 'd6IKUtAUDiKyAhpJtrLFcwtt', - config: 'app/root.jsx', - bridge: 'app/routes/home.jsx', + config: 'app/root.tsx', + bridge: 'app/routes/$.jsx', public: 'public', port: '3000', + repositoryUrl: 'https://github.com/storyblok/remix-ultimate-tutorial', + branch: 'part-1', + tutorialLink: 'https://www.storyblok.com/tp/the-storyblok-remix-ultimate-tutorial', }, { name: 'Astro', @@ -124,15 +119,18 @@ const frameworks = [ tutorialLink: 'https://www.storyblok.com/tp/the-storyblok-sveltekit-ultimate-tutorial', }, { - name: 'Gatsby.js', - value: 'gatsbyjs', + name: 'Gatsby', + value: 'gatsby', start: 'start', token: 'W1vLyxT5rQ15jBpANjnv0gtt', config: 'gatsby-config.js', bridge: 'src/pages/index.js', public: 'static', port: '8000', - submodules: true, + tutorialLink: 'https://www.storyblok.com/tp/storyblok-gatsby-ultimate-tutorial', + branch: 'part-1', + repositoryUrl: 'https://github.com/storyblok/gatsby-ultimate-tutorial', + }, ] as Framework[] From d1deb8fc425d578a6ffebd9f1d307320cbeba1b3 Mon Sep 17 00:00:00 2001 From: Roberto Butti Date: Thu, 11 Apr 2024 22:35:22 +0200 Subject: [PATCH 2/2] chore: fix style --- src/lib/frameworks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/frameworks.ts b/src/lib/frameworks.ts index 35512df..cfb3f59 100644 --- a/src/lib/frameworks.ts +++ b/src/lib/frameworks.ts @@ -39,7 +39,7 @@ const frameworks = [ bridge: 'src/pages/Home.vue', public: 'public', port: '3000', - tutorialLink: 'https://www.storyblok.com/tp/add-a-headless-CMS-to-vuejs-in-5-minutes' + tutorialLink: 'https://www.storyblok.com/tp/add-a-headless-CMS-to-vuejs-in-5-minutes', }, { name: 'Nuxt',