1.2.12 • Published 2 years ago

senior-scene v1.2.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Senior Scene

Use the init command to initialize dependencies for a new project:

npx senior-scene@latest init

Senior Scene logo

Run the following command to start the development server:

npm run dev

Playground Live Demo

Introduction

Hello, awesome developers! Get ready to embark on a magical journey where we transform a blank slate into a React front-end masterpiece. šŸŽØšŸ‘Øā€šŸ’»āœØ

What's Cooking?

This script is like a gourmet recipe for setting up a React project with Vite and Tailwind CSS. It's spicy with a touch of sweetness, ensuring your project looks good and runs smoothly.

Ingredients

  • Vite and React: The bread and butter of our project.
  • Tailwind CSS: For styling that's as easy as pie.
  • PostCSS and Autoprefixer: They're like kitchen helpers making sure your CSS looks great in all browsers.
  • Shadcn UI: A secret sauce for UI components.
  • React Router: To navigate through your app like a GPS.

Step-by-Step Guide

  1. Creating the Project: We start with npm create vite@latest to summon a new React project from the digital ether.
  2. Adding Style: npm install -D tailwindcss postcss autoprefixer brings in Tailwind CSS, making your app look like it walked off a fashion runway.
  3. Tailwind Configuration: With a few echoes, we tell App.css to embrace Tailwind's beauty.
  4. JS Superpowers: Update jsconfig.json to make importing components feel like teleporting.
  5. Vite Config Magic: We then write an enchanting spell in vite.config.js to make sure our paths are as clear as a summer sky.
  6. Node Types and More: A dash of @types/node and some tasty libraries like lucide-react and @tanstack/react-table to add more flavors.
  7. Component Galore: Here comes the fun part! We use Shadcn UI to add a plethora of components like a wizard conjuring spells.
  8. Routing Like a Pro: Set up react-router-dom to navigate around your application like a starship captain.
  9. File Structure Fun: We create a neat and tidy folder structure, ensuring everything is in its right place.
  10. Themes and Toggles: Because everyone loves a little customization, right?
  11. Run, Forest, Run!: Finally, npm run dev to bring your project to life. It's alive! šŸ§Ÿā€ā™‚ļø

Project structure

.
ā”œā”€ā”€ node_modules/
ā”œā”€ā”€ public/
│   └── vite.svg
└── src/
    ā”œā”€ā”€ assets/
    │   └── react.svg
    ā”œā”€ā”€ components/
    │   └── features/
    │       ā”œā”€ā”€ accordion.jsx
    │       ā”œā”€ā”€ alert-dialog.jsx
    │       ā”œā”€ā”€ alert.jsx
    │       ā”œā”€ā”€ avatar.jsx
    │       ā”œā”€ā”€ button.jsx
    │       ā”œā”€ā”€ calendar.jsx
    │       ā”œā”€ā”€ card.jsx
    │       ā”œā”€ā”€ collapsible.jsx
    │       ā”œā”€ā”€ combobox.jsx
    │       ā”œā”€ā”€ command.jsx
    │       ā”œā”€ā”€ context-menu.jsx
    │       ā”œā”€ā”€ data-table.jsx
    │       ā”œā”€ā”€ date-picker.jsx
    │       ā”œā”€ā”€ dialog.jsx
    │       └── ... (more files)
    │   └── ui/
    │       ā”œā”€ā”€ accordion.jsx
    │       ā”œā”€ā”€ alert-dialog.jsx
    │       ā”œā”€ā”€ alert.jsx
    │       ā”œā”€ā”€ aspect-ratio.jsx
    │       ā”œā”€ā”€ avatar.jsx
    │       ā”œā”€ā”€ badge.jsx
    │       ā”œā”€ā”€ button.jsx
    │       ā”œā”€ā”€ calendar.jsx
    │       ā”œā”€ā”€ card.jsx
    │       ā”œā”€ā”€ checkbox.jsx
    │       ā”œā”€ā”€ collapsible.jsx
    │       ā”œā”€ā”€ command.jsx
    │       ā”œā”€ā”€ context-menu.jsx
    │       ā”œā”€ā”€ dialog.jsx
    │       ā”œā”€ā”€ dropdown-menu.jsx
    │       ā”œā”€ā”€ form.jsx
    │       ā”œā”€ā”€ hover-card.jsx
    │       ā”œā”€ā”€ input.jsx
    │       ā”œā”€ā”€ label.jsx
    │       ā”œā”€ā”€ menubar.jsx
    │       ā”œā”€ā”€ navigation-menu.jsx
    │       ā”œā”€ā”€ popover.jsx
    │       ā”œā”€ā”€ progress.jsx
    │       ā”œā”€ā”€ radio-group.jsx
    │       ā”œā”€ā”€ scroll-area.jsx
    │       ā”œā”€ā”€ select.jsx
    │       ā”œā”€ā”€ separator.jsx
    │       ā”œā”€ā”€ sheet.jsx
    │       ā”œā”€ā”€ skeleton.jsx
    │       ā”œā”€ā”€ slider.jsx
    │       ā”œā”€ā”€ switch.jsx
    │       ā”œā”€ā”€ table.jsx
    │       ā”œā”€ā”€ tabs.jsx
    │       ā”œā”€ā”€ textarea.jsx
    │       ā”œā”€ā”€ toast.jsx
    │       ā”œā”€ā”€ toaster.jsx
    │       ā”œā”€ā”€ toggle-group.jsx
    │       ā”œā”€ā”€ toggle.jsx
    │       ā”œā”€ā”€ tooltip.jsx
    │       └── use-toast.js
    │   └── theme-toggle.jsx
    ā”œā”€ā”€ context/
    │   └── theme-context.jsx
    ā”œā”€ā”€ lib/
    │   └── utils.js
    ā”œā”€ā”€ pages/
    │   ā”œā”€ā”€ home.jsx
    │   └── App.jsx
    ā”œā”€ā”€ index.css
    ā”œā”€ā”€ main.jsx
    ā”œā”€ā”€ .eslintrc.cjs
    ā”œā”€ā”€ .gitignore
    ā”œā”€ā”€ components.json
    ā”œā”€ā”€ index.html
    ā”œā”€ā”€ jsconfig.json
    ā”œā”€ā”€ package-lock.json
    ā”œā”€ā”€ package.json
    ā”œā”€ā”€ postcss.config.js
    ā”œā”€ā”€ README.md
    ā”œā”€ā”€ tailwind.config.js
    └── vite.config.js

Conclusion

And there you have it, folks! A complete setup for a front-end project that's as easy as baking a cake — maybe even easier if you're not good at baking. šŸ°

Happy Coding! šŸŽ‰

This document aims to provide a clear, enjoyable, and informative guide to understanding and navigating your script for setting up a front-end project.

License

MIT License

1.2.12

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.9

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago