Skip to content

Commit

Permalink
Copy vite-env.d.ts when using typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkleemans committed Nov 21, 2023
1 parent fa1f29b commit 95926f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions create-test-app.sh
Expand Up @@ -10,9 +10,10 @@ cp ./example/src/assets/style.svg ./test-app/src/assets/style.svg
cp ./example/src/assets/circle.svg ./test-app/src/assets/circle.svg
cp ./example/public/root.svg ./test-app/public/root.svg

# Remove `lang="ts"` from `<script>`` if project is not using typescript
# TypeScript only commands
if [[ "$2" != "--typescript" ]]; then
sed -i 's/ lang="ts"//' ./test-app/src/App.vue
sed -i 's/ lang="ts"//' ./test-app/src/App.vue # Remove `lang="ts"` from `<script>`
cp ./example/src/vite-env.d.ts ./test-app/src/vite-env.d.ts
fi

# Install and build app
Expand Down

0 comments on commit 95926f7

Please sign in to comment.