npm install- Install dependencies.npm run start- Start the project. Visit http://localhost:5173/npm run build- Build the project.npm run lint- Run ESLint.npm run format- Run Prettier.npm run test- Run tests.docker:dev:build- Build the Docker image for developmentdocker:dev- Run the Docker container for development. Visit http://localhost:5173/docker:prod:build- Build the Docker image for production.docker:prod- Run the Docker container for production. Visit http://localhost:80/folders-tree/
For more scripts please check package.json
🎉 You can view the deployed website here: https://ikh00000.github.io/folders-tree/
An empty array, an array with an empty string, or an array with only a forward slash will return nothing.
[]- Nothing to show.[""]- Nothing to show.["/"]- Nothing to show.
- If a path ends with a forward slash, it is considered a folder (whether it has content or is empty).
- If it does not end with a forward slash, it is considered a file.
["/path"]- File.["path"]- File.["/path/"]- Folder (empty).["path/"]- Folder (empty).
Paths can be modified, but there are some rules to follow:
["/folder/", "/folder/file"]- Files and folders can be added to a folder.["/folder/file", "/folder/"]- Files and folders cannot be removed from a folder in this manner (i.e., a file can become a folder, but a folder cannot become a file).["/path", "/path/"]- If"path"was previously a file, it can now be a folder.["/path/abc", "/path"]- If"path"was previously a folder, it cannot be a file. In this case,"/path"will be ignored.["/path/file", "/paths/file"]- Duplicates are allowed but will be ignored.- Note: We do not validate for duplicate file or folder names. While validation might seem useful, it could introduce complications (for example, how to show the user the correct location of the duplicate, what to do with other paths at this time, etc.). This would be a great feature if we were adding one path at a time, rather than an array of paths at once. Please refer to the rules above to understand how modifications work.