Using the project editor, you can do any of the following...
Add a new file:
- In the project editor, click the + at the top of the file list.
- In the pop-up menu, type in the file name and the extension of the file that you would like to add. By default, it's a javascript file, but you can add an html file, a css file, or whichever type of file is necessary for your project.
- Click Add This File, and the project editor will go directly to the file that you just created where you can start adding in code.
Upload an existing file:
- In the project editor, click the + at the top of the file list.
- In the drop-down menu, click Upload a File.
- In the popup window, navigate to the file you would like to add to your project and click Open.
Rename a file:
- In the project editor, hover over the file you would like to rename and click the three dots directly to the right of your selection.
- Select Rename and a blinking cursor will appear at the end of the file name.
- Type in the new file name and extension.
Note: If you change the file extension, the highlight color of the file will change based on the type of file you choose.
Copy a file:
- In the project editor, hover over the file you would like to copy and click the three dots directly to the right of your selection.
- Select Duplicate.
- In the popup alert, type the name of the new file.
Delete a file:
- In the project editor, hover over the file you would like to delete and click the three dots directly to the right of your selection.
- Select Delete.
- In the popup alert, click OK to confirm deletion.
Move a file:
You can move files in and out of folders by clicking and dragging if you’re on a desktop computer. Click a file and drag it to the location you want to move it to, dropping it onto a folder or a file in the target folder.
Alternatively, rename the file to add or remove a folder name and Glitch will automatically update your project file tree.
If you move the last file out of a folder, the folder will disappear.