Open3
svelteお試し
node.jsインストール
- ダウンロード最新のバージョン: 18.17.1 (同梱 npm 9.6.7)
-
node-v18.17.1.pkg
をダブルクリック- デフォルトインストール
- ターミナルを起動
- sharl@macMini ~ %
node --version
v18.17.1
SvelteKitをインストール
- sharl@macMini ~ %
mkdir dev/svelte ; cd dev/svelte
- sharl@macMini svelte %
npm create svelte@latest myapp
Need to install the following packages:
create-svelte@5.0.5
- Ok to proceed? (y)
y
- Which Svelte app template? :
Skeleton project (Barebones scaffolding for your new SvelteKit app)
- Add type checking with TypeScript? :
Yes, using TypeScript syntax
- Select additional options (use arrow keys/space bar) :
実行結果
Your project is ready!
✔ Typescript
Inside Svelte components, use <script lang="ts">
Install community-maintained integrations:
https://github.com/svelte-add/svelte-add
Next steps:
1: cd myapp
2: npm install (or pnpm install, etc)
3: git init && git add -A && git commit -m "Initial commit" (optional)
4: npm run dev -- --open
To close the dev server, hit Ctrl-C
Stuck? Visit us at https://svelte.dev/chat
npm notice
npm notice New major version of npm available! 9.6.7 -> 10.1.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.1.0
npm notice Run npm install -g npm@10.1.0 to update!
npm notice
- sharl@macMini svelte %
cd myapp
tree
実行結果
.
├── README.md
├── package.json
├── src
│ ├── app.d.ts
│ ├── app.html
│ ├── lib
│ │ └── index.ts
│ └── routes
│ └── +page.svelte
├── static
│ └── favicon.png
├── svelte.config.js
├── tsconfig.json
└── vite.config.ts
5 directories, 10 files