Back to Overview | Next: Your first change
First, a warning: this project has a lot of folders! I haven't hidden any of the folders from you this time because as you troubleshoot the various phases of the project, you made need access to all the different configuration files that help your project run.
That said, you can ignore most files and folders here: if a folder or file starts with a ., that's a sign it's what's called a "configuration file" and probably can be ignored for now.
Here’s a breakdown of the files you need:
- Purpose: Contains all your source code—the heart of your project.
Contains all the JavaScript files that make your website work.
The entry point for your application. This file initializes the app and sets up routing. This file will have to import any other files that you create (such as new pages or utilities that you add to your website).
This is where you can add new code that is customized for different pages of your portfolio. To start, there is a welcome.js file that contains the code for the home page of your portfolio and a binarySearch.js file the contains a template for putting your first project in your portfolio. You can add more files here for additional pages.
- Purpose: Contains utility functions that can be used across different pages.
- Details: This is where you can add helper functions that are not specific to a single page but are used by multiple pages.
- Example: The
renderMenu.jsfile contains a function to render the navigation menu on each page. You could add more utility functions here as needed.
- Example: The
This contains CSS which powers your project. You could add more CSS files here if you end up wanting to customize the appearance of your portfolio, though you can also use libraries for that (more on that later).
- Install dependencies: You can probably skip this step: Codespaces usually does it for you. But if you are running this on your own computer, you will need to run this command once to install the necessary packages.
npm install- Start the dev server:
npm run devOr you can use the play/debug button in Codespaces.
-
Open your browser to http://localhost:5173 (or the URL shown in your terminal).
-
Edit pages and utilities in the
src/scripts/folder. The site will reload automatically.
- First Change: Make your first edit.
- Using Libraries: Learn how to add JavaScript libraries.
- Create a Component: Build your own reusable code.
- Deploy: Publish your site online.