Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
next-starter
This template has everything you need to start building your Next.js app with typescript, tailwind CSS, and ESlint π (by avneesh0612)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
tailwindcsscli
A CLI for generating starter files for different JS frameworks with tailwindCSS pre-installed
As we are creating starter files, let's use ShellJS to run commands like git clone, mkdir...
#! /usr/bin/env node const inquirer = require('inquirer'); const shell = require('shelljs'); const path = process.cwd(); const { questions, questionsTs } = require('./utils/questions.js'); inquirer.prompt(questions).then((answers) => { if (answers.framework === 'React') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/GKaszewski/react-tailwind-typescript-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/YashKumarVerma/react-tailwind-template ${answers.projectName}` ); console.log('π οΈ Successfully build the required files'); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'NextJS') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/avneesh0612/next-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/Neeraj1005/Nextjs-tailwind-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'Svelte') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/jhanca-vm/Svelte-Tailwind ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/web2033/vite-vue3-tailwind-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } });
#! /usr/bin/env node const inquirer = require('inquirer'); const shell = require('shelljs'); const path = process.cwd(); const { questions, questionsTs } = require('./utils/questions.js'); inquirer.prompt(questions).then((answers) => { if (answers.framework === 'React') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/GKaszewski/react-tailwind-typescript-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/YashKumarVerma/react-tailwind-template ${answers.projectName}` ); console.log('π οΈ Successfully build the required files'); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'NextJS') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/avneesh0612/next-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/Neeraj1005/Nextjs-tailwind-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'Svelte') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/jhanca-vm/Svelte-Tailwind ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/web2033/vite-vue3-tailwind-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } });
#! /usr/bin/env node const inquirer = require('inquirer'); const shell = require('shelljs'); const path = process.cwd(); const { questions, questionsTs } = require('./utils/questions.js'); inquirer.prompt(questions).then((answers) => { if (answers.framework === 'React') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/GKaszewski/react-tailwind-typescript-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/YashKumarVerma/react-tailwind-template ${answers.projectName}` ); console.log('π οΈ Successfully build the required files'); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'NextJS') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/avneesh0612/next-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/Neeraj1005/Nextjs-tailwind-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'Svelte') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/jhanca-vm/Svelte-Tailwind ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/web2033/vite-vue3-tailwind-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } });
#! /usr/bin/env node const inquirer = require('inquirer'); const shell = require('shelljs'); const path = process.cwd(); const { questions, questionsTs } = require('./utils/questions.js'); inquirer.prompt(questions).then((answers) => { if (answers.framework === 'React') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/GKaszewski/react-tailwind-typescript-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/YashKumarVerma/react-tailwind-template ${answers.projectName}` ); console.log('π οΈ Successfully build the required files'); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'NextJS') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/avneesh0612/next-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/Neeraj1005/Nextjs-tailwind-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'Svelte') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/jhanca-vm/Svelte-Tailwind ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/web2033/vite-vue3-tailwind-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } });
#! /usr/bin/env node const inquirer = require('inquirer'); const shell = require('shelljs'); const path = process.cwd(); const { questions, questionsTs } = require('./utils/questions.js'); inquirer.prompt(questions).then((answers) => { if (answers.framework === 'React') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/GKaszewski/react-tailwind-typescript-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/YashKumarVerma/react-tailwind-template ${answers.projectName}` ); console.log('π οΈ Successfully build the required files'); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'NextJS') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/avneesh0612/next-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/Neeraj1005/Nextjs-tailwind-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'Svelte') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/jhanca-vm/Svelte-Tailwind ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/web2033/vite-vue3-tailwind-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } });
#! /usr/bin/env node const inquirer = require('inquirer'); const shell = require('shelljs'); const path = process.cwd(); const { questions, questionsTs } = require('./utils/questions.js'); inquirer.prompt(questions).then((answers) => { if (answers.framework === 'React') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/GKaszewski/react-tailwind-typescript-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/YashKumarVerma/react-tailwind-template ${answers.projectName}` ); console.log('π οΈ Successfully build the required files'); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'NextJS') { inquirer.prompt(questionsTs).then((answersTs) => { if (answersTs.typescript === 'Yes') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/avneesh0612/next-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/Neeraj1005/Nextjs-tailwind-template ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } }); } else if (answers.framework === 'Svelte') { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/jhanca-vm/Svelte-Tailwind ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } else { shell.exec(`mkdir ${answers.projectName}`); shell.exec( `git clone https://github.com/web2033/vite-vue3-tailwind-starter ${answers.projectName}` ); shell.cd(`${path}/${answers.projectName}`); shell.exec(`npm i`); console.log( 'π¨βπ» Successfully installed all the required dependencies\nHappy hacking π' ); } });
We add colors to the text by using Chalk
Check out license-templates GitHub repository for license templates which you could use in your project. In my case, I am using MIT license
{ "name": "@kira272921/tailwindcsscli", "version": "1.0.0", "description": "A CLI for generating starter files for different JS frameworks with tailwindCSS pre-installed", "main": "./bin/index.js", "bin": { "tcli": "./bin/index.js" }, "scripts": { "start": "node ./bin/index.js" }, "keywords": ["cli", "tailwindcss", "nodejs"], "author": "Kira272921", "license": "MIT", "dependencies": { "inquirer": "^8.2.0", "shelljs": "^0.8.4" }, "repository": { "type": "git", "url": "git+https://github.com/Kira272921/tailwindcsscli.git" }, "bugs": { "url": "https://github.com/Kira272921/tailwindcsscli/issues" }, "homepage": "https://github.com/Kira272921/tailwindcsscli/issues#readme" }