Instructor: Let's start by creating a package.json file using npm init -y. Now let's install parcel, parcel-svelte, and svelte as dev dependencies.
Inside our editor, create the index.html file inside of the root directory and create a source directory containing our main.js file. Open the index.html file and add some basic HTML structure including a script tag pointing to the main.js file.
Let's edit the package.json file and add two entries to the script section. First, we add the command for parcel development server. Let's copy this and create the second command for the production build. Let's add another entry to our package.json file containing browsers list. This will be used by parcel when compiling.
Now let's create the app.svelte file inside of this source directory and add some svelte code. Edit the main.js file and add the instantiation code for svelte component we just made. Open your terminal and run the parcel development server using npm start. Now open your browser and visit localhost:1234.
Let's recap what we did. We installed parcel, svelte, and the parcel-svelte-plugin in order to compile svelte components. We set up the parcel development server and the production build command in our package.json file. Then, we created a simple svelte component to test it out.