0
0
Svelteframework~5 mins

Project structure in Svelte - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the src folder in a Svelte project?
The src folder holds all the source code files like components, styles, and scripts that make up the app. It's where you write your app's logic and UI.
Click to reveal answer
beginner
What does the public folder contain in a Svelte project?
The public folder contains static files like images, icons, and the main index.html file. These files are served directly to the browser without processing.
Click to reveal answer
beginner
Why is the package.json file important in a Svelte project?
It lists the project dependencies, scripts to run or build the app, and metadata. It helps manage packages and commands for your project.
Click to reveal answer
beginner
What role does the node_modules folder play in a Svelte project?
It stores all the installed packages and libraries your project depends on. You usually don't edit files here; it's managed by the package manager.
Click to reveal answer
beginner
Where do you place reusable UI parts like buttons or headers in a Svelte project?
Reusable UI parts are usually placed inside the src/lib or src/components folder to keep the code organized and easy to find.
Click to reveal answer
Which folder in a Svelte project contains the main HTML file served to the browser?
Asrc
Bpublic
Cnode_modules
Dlib
Where do you write your Svelte components and app logic?
Asrc
Bpublic
Cnode_modules
Dpackage.json
What is the main purpose of the package.json file?
AManage dependencies and scripts
BSave user data
CHold compiled code
DStore static images
Which folder should you avoid editing directly because it is managed by the package manager?
Asrc
Bpublic
Cnode_modules
Dlib
Where do you typically put reusable UI components in a Svelte project?
Apackage.json
Bpublic
Cnode_modules
Dsrc/components or src/lib
Describe the main folders and files in a Svelte project and their roles.
Think about where you write code, where static files live, and how dependencies are managed.
You got /5 concepts.
    Explain why organizing your Svelte project structure well helps in development.
    Consider how a tidy workspace helps you work faster and avoid confusion.
    You got /5 concepts.