Code Monkey home page Code Monkey logo

create-tw's Introduction

image

Create Tailwind (create-tw)

The easiest way to get started with TailwindCSS.

It uses popular scaffolding scripts like create-next-app, create-vite, create-astro, or create-svelte to scaffold projects and then configures TailwindCSS to work with your project out of the box.

npx

npx create-tw@latest

# OR

npx create-tw@latest <project-name> --template <id>

yarn

yarn create tw

# OR

yearn create tw <project-name> --template <id>

pnpm

pnpm create tw

# OR

pnpm create tw <project-name> --template <id>
  1. Pick project type
    • Nextjs (create-next-app)
    • Vanilla (create-vite)
    • React (create-vite)
    • Vue (create-vite)
    • Astro (create-astro)
    • Svelte (create-svelte)
    • Preact (create-vite)
    • Solid (degit)
  2. Pick language
    • TypeScript
    • JavaScript
  3. Pick dependencies
    • Prettier, clsx, etc.
  4. Pick Plugins
    • Daisy UI, @tailwindcss/typography, etc

It's ready! ✅

Currently in very early stage of development

Ideas, suggestions and bug reports are much appreciated. In the following days I'm planning to add support for React, Vue & Svelte with Vite.

Scaffolding tools

id Template Tool
nextjs Next.js create-next-app
vanilla Vanilla create-vite
react React create-vite
vue Vue create-vite
astro Astro create-astro
svelte-kit Svelte Kit create-svelte
preact Preact create-vite
solid Solid degit

NOTE: Add the -ts postfix to the ID to install with TypeScript

Include template id to skip input steps

npx create-tw@latest --template <id>
# OR
yarn create tw --template <id>

create-tw's People

Contributors

agsdot avatar andrejjurkin avatar angra974 avatar ebimo21 avatar karthik-315 avatar philippdormann avatar rinshin-jalal avatar selemondev avatar subhoghoshx avatar vedantnn71 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-tw's Issues

Add simple integration tests

It would be cool if someone could write basic integration tests to confirm that each variant creates as expected and the build is not crashing.

Update `README.md` with some images or gif.

The README can be improved by adding some images of the package in action.
This will help the users to understand how the package works and how to interact with it.

Something like this:

start
end

I think a gif showing the whole process will be a better choice.

Svelte Kit is project type stopped working

image

Currently we're using create function from 'create-svelte' package. (src/cli/commands/createSvelte.ts) we need to check if the problem is on our side, and what's changed that using this command is not working anymore.

Empty new project fails to start

I was tring to create an project with ist, but the site won't start. here's all I did_
I don't know what is the problem. Do you have any clue?

PS C:\Users\benny\source\repos> npx create-tw@latest
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

_ ._ _ . | _ |
(
| (/_ (| | (/_ |_ //

Welcome to create-tw!
The easiest way to create a Tailwind project

? Project name trakr-site
? App type Preact (create-vite)
? What language will your project be written in? ts
? Which dependencies would you like to include? prettier
? Which plugins would you like to include? @tailwindcss/forms, daisyui, prettier-plugin-tailwindcss

Using: npm

Installing project using create-vite

Scaffolding project in C:\Users\benny\source\repos\trakr-site...

Done. Now run:

cd trakr-site
npm install
npm run dev

✔ Project created using create-vite
✔ tailwind.config.cjs created
✔ postcss.config.cjs created
✔ Added Tailwind directives
✔ Added Tailwind template
✔ Deleted unneeded files
✔ Dependencies installed
✔ .prettierrc and .prettierignore created

Project created in C:\Users\benny\source\repos\trakr-site

cd trakr-site
npm run dev

Happy coding!
PS C:\Users\benny\source\repos> cd .\trakr-site
PS C:\Users\benny\source\repos\trakr-site> npm i

up to date, audited 163 packages in 777ms

25 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

PS C:\Users\benny\source\repos\trakr-site> npm run dev

[email protected] dev
vite

VITE v5.0.10 ready in 437 ms

➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
10:56:34 [vite] Pre-transform error: [postcss] Identifier 'require' has already been declared
10:56:35 [vite] Internal server error: [postcss] Identifier 'require' has already been declared
Plugin: vite:css
File: C:/Users/benny/source/repos/trakr-site/src/index.css:undefined:NaN
at new Script (node:vm:94:7)
at createScript (node:vm:250:10)
at Object.runInThisContext (node:vm:298:10)
at evalModule (C:\Users\benny\source\repos\trakr-site\node_modules\jiti\dist\jiti.js:1:256254)
at jiti (C:\Users\benny\source\repos\trakr-site\node_modules\jiti\dist\jiti.js:1:254371)
at C:\Users\benny\source\repos\trakr-site\tailwind.config.cjs:9:5
at evalModule (C:\Users\benny\source\repos\trakr-site\node_modules\jiti\dist\jiti.js:1:256443)
at jiti (C:\Users\benny\source\repos\trakr-site\node_modules\jiti\dist\jiti.js:1:254371)
at C:\Users\benny\source\repos\trakr-site\node_modules\tailwindcss\lib\lib\load-config.js:48:30
at loadConfig (C:\Users\benny\source\repos\trakr-site\node_modules\tailwindcss\lib\lib\load-config.js:50:6)
at getTailwindConfig (C:\Users\benny\source\repos\trakr-site\node_modules\tailwindcss\lib\lib\setupTrackingContext.js:71:116)
at C:\Users\benny\source\repos\trakr-site\node_modules\tailwindcss\lib\lib\setupTrackingContext.js:100:92
at C:\Users\benny\source\repos\trakr-site\node_modules\tailwindcss\lib\processTailwindFeatures.js:48:11
at plugins (C:\Users\benny\source\repos\trakr-site\node_modules\tailwindcss\lib\plugin.js:38:69)
at LazyResult.runOnRoot (C:\Users\benny\source\repos\trakr-site\node_modules\postcss\lib\lazy-result.js:329:16)
at LazyResult.runAsync (C:\Users\benny\source\repos\trakr-site\node_modules\postcss\lib\lazy-result.js:258:26)
at LazyResult.async (C:\Users\benny\source\repos\trakr-site\node_modules\postcss\lib\lazy-result.js:160:30)
at LazyResult.then (C:\Users\benny\source\repos\trakr-site\node_modules\postcss\lib\lazy-result.js:404:17)
^C^CBatchvorgang abbrechen (J/N)?
^C
PS C:\Users\benny\source\repos\trakr-site>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.