Last active
April 21, 2024 14:59
-
-
Save guiseek/022b373d9173a2afdf3442286636bcca to your computer and use it in GitHub Desktop.
create vite project with three.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pnpm create vite@latest $1 --template vanilla-ts | |
cd $1 | |
nvm use 20 | |
pnpm add three | |
pnpm add -D @types/three sass | |
rm src/counter.ts | |
mv src/typescript.svg public/ts.svg | |
sed 's/vite\.svg/ts\.svg/g' index.html > temp.html | |
rm index.html | |
mv temp.html index.html | |
rm public/vite.svg | |
mv src/style.css src/style.scss | |
echo 'import "./style.scss";' > src/main.ts | |
echo "declare const app: HTMLDivElement" >> src/vite-env.d.ts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment