Write a theme folder (manifest + theme.css). Overwrites existing files.
( dir: string, slug: string, manifestJson: string, css: string )
| 168 | |
| 169 | /** Write a theme folder (manifest + theme.css). Overwrites existing files. */ |
| 170 | async function writeThemeFolder( |
| 171 | dir: string, |
| 172 | slug: string, |
| 173 | manifestJson: string, |
| 174 | css: string |
| 175 | ): Promise<void> { |
| 176 | const folder = path.join(dir, slug) |
| 177 | await fs.mkdir(folder, { recursive: true }) |
| 178 | await Promise.all([ |
| 179 | fs.writeFile(path.join(folder, 'manifest.json'), manifestJson), |
| 180 | fs.writeFile(path.join(folder, 'theme.css'), css) |
| 181 | ]) |
| 182 | } |
| 183 | |
| 184 | /** Create the themes dir on first run (seeding Soft Paper + README), and migrate |
| 185 | * any leftover `*.toml` palette files from the pre-release WIP. */ |
no outgoing calls
no test coverage detected