Advanced attributes and properties for fine-tuning file generation.
Control file permissions, encoding, and other properties.
root:
- Type: File
- Name: script.sh
- Permissions: 755
- Encoding: utf-8
- LineEnding: unix
<content>
#!/bin/bash
echo "Hello World"
</content>
<description>
Executable shell script
</description>Use conditions to control when files should be created.
root:
- Type: File
- Name: .gitignore
- Condition: "git == true"
<content>
node_modules/
dist/
.env
</content>
- Type: File
- Name: Dockerfile
- Condition: "docker == true"
<content>
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["npm", "start"]
</content>Use variables to make templates more flexible.
root:
- Type: File
- Name: package.json
<content>
{
"name": "${PROJECT_NAME}",
"version": "${VERSION}",
"description": "${DESCRIPTION}",
"author": "${AUTHOR}",
"scripts": {
"start": "node index.js",
"test": "jest"
}
}
</content>
<description>
Package configuration with variables
</description>Define custom attributes for specialized use cases.
root:
- Type: File
- Name: config.json
- Custom: ["env:production", "encrypted:true"]
- Priority: high
- Dependencies: ["database", "cache"]
<content>
{
"environment": "production",
"encrypted": true,
"priority": "high"
}
</content>