How to define hierarchical file and directory structures in ForSure.
Directories are defined using indentation and the Type: Directory property.
root:
- Type: Directory
- Name: src/
<description>
Main source directory
</description>
- Type: Directory
- Name: components/
<description>
React components
</description>
- Type: File
- Name: Button.jsx
<description>
Button component
</description>Files are defined with Type: File and can include content templates.
root:
- Type: File
- Name: package.json
<content>
{
"name": "my-project",
"version": "1.0.0",
"scripts": {
"start": "node index.js"
}
}
</content>
<description>
Package configuration
</description>Create complex nested structures by combining directories and files.
root:
- Type: Directory
- Name: web-app/
<description>
Full web application structure
</description>
- Type: File
- Name: package.json
<content>
{"name": "web-app", "version": "1.0.0"}
</content>
- Type: Directory
- Name: public/
<description>
Static assets
</description>
- Type: Directory
- Name: src/
<description>
Source code
</description>
- Type: File
- Name: index.html
<content>
<!DOCTYPE html>
<html>
<head><title>Web App</title></head>
<body><h1>Hello World</h1></body>
</html>
</content>