From a14baf9459cad339f9ce8972c09d6a9c6a0de1ba Mon Sep 17 00:00:00 2001 From: tzsk Date: Fri, 20 Jan 2023 17:33:08 +0530 Subject: [PATCH] add: Support for Next 13 --- README.md | 33 +++++++++++++++--------- package-lock.json | 4 +-- package.json | 2 +- src/frameworks/nextjs.ts | 2 ++ tests/__snapshots__/drivers.spec.ts.snap | 2 ++ 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 80748fd..e121c95 100644 --- a/README.md +++ b/README.md @@ -22,22 +22,29 @@ Scaffold a new project of your choice of framework, with tailwindcss npx twify@latest create vite # Or with preferred package Manager - +# Yarn npx twify@latest yarn create vite +# PNPM +npx twify@latest pnpm create vite ``` Above the project that is specified is `vite`. You can choose any of the following. -Supported Projects are: +**Project Usage**: + +Below commands will install the `@latest` versions of the respective frameworks. -- `create next ` - (Latest Next JS) -- `create nuxt ` - (Nuxt 2) -- `create nuxt3 ` - (Nuxt 3) -- `create svelte ` - (Svelte Kit) -- `create remix ` - (Latest Remix) -- `create react ` - (Latest CRA) -- `create angular ` - (Latest Angular) -- `create laravel ` - (Latest Laravel) +| **Framework** | **Command** | +| ---------------- | ------------------------------------------ | +| Next 13 | `npx twify@latest create next ` | +| Remix | `npx twify@latest create remix ` | +| Nuxt 2 | `npx twify@latest create nuxt ` | +| Nuxt 3 | `npx twify@latest create nuxt3 ` | +| Svelte Kit | `npx twify@latest create svelte ` | +| Laravel Vite | `npx twify@latest create laravel ` | +| Vite | `npx twify@latest create vite ` | +| Angular | `npx twify@latest create angular ` | +| Create React App | `npx twify@latest create react ` | You can pass all the framework specific flags as well like the following, @@ -95,7 +102,7 @@ Below are the list of Supported Projects, | **Framework** | **Javascript** | **Typescript** | | ---------------- | ------------------ | ------------------ | -| Next JS | :white_check_mark: | :white_check_mark: | +| Next 13 | :white_check_mark: | :white_check_mark: | | Remix | :white_check_mark: | :white_check_mark: | | Nuxt 2 | :white_check_mark: | :white_check_mark: | | Nuxt 3 | :white_check_mark: | :white_check_mark: | @@ -104,7 +111,9 @@ Below are the list of Supported Projects, | Vite | :white_check_mark: | :white_check_mark: | | Angular | :white_check_mark: | :white_check_mark: | | Create React App | :white_check_mark: | :white_check_mark: | -| Gatsby | :o: WIP | :o: WIP | +| Solid JS | :o: WIP | :o: WIP | +| Astro | :o: WIP | :o: WIP | +| Qwik | :o: WIP | :o: WIP | ## :microscope: Testing diff --git a/package-lock.json b/package-lock.json index 0526df3..7bdbf26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "twify", - "version": "0.4.1", + "version": "0.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "twify", - "version": "0.4.1", + "version": "0.4.2", "license": "MIT", "dependencies": { "chalk": "^5.0.1", diff --git a/package.json b/package.json index f6e75b8..7cf2f7d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twify", - "version": "0.4.1", + "version": "0.4.2", "description": "A Tool to Setup TailwindCSS in your Project with a Single Command", "bin": { "twify": "dist/main.js" diff --git a/src/frameworks/nextjs.ts b/src/frameworks/nextjs.ts index 569e7b3..740a05a 100644 --- a/src/frameworks/nextjs.ts +++ b/src/frameworks/nextjs.ts @@ -7,6 +7,8 @@ const NextJS: Framework = { content: [ './pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}', + './src/**/*.{js,ts,jsx,tsx}', + './app/**/*.{js,ts,jsx,tsx}', ], steps: [], }; diff --git a/tests/__snapshots__/drivers.spec.ts.snap b/tests/__snapshots__/drivers.spec.ts.snap index 81646ae..1cbf220 100644 --- a/tests/__snapshots__/drivers.spec.ts.snap +++ b/tests/__snapshots__/drivers.spec.ts.snap @@ -5,6 +5,8 @@ exports[`Drivers > has a list of drivers 1`] = ` "content": [ "./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}", + "./src/**/*.{js,ts,jsx,tsx}", + "./app/**/*.{js,ts,jsx,tsx}", ], "cssLocation": "./styles/globals.css", "initCommands": [