(options: CreateThemeOptions)
| 48 | } |
| 49 | |
| 50 | async function writeLicense(options: CreateThemeOptions) { |
| 51 | const user = await getGitUser() |
| 52 | const MIT = `MIT License |
| 53 | |
| 54 | Copyright (c) ${new Date().getFullYear()}-present ${user}. |
| 55 | |
| 56 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 57 | of this software and associated documentation files (the "Software"), to deal |
| 58 | in the Software without restriction, including without limitation the rights |
| 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 60 | copies of the Software, and to permit persons to whom the Software is |
| 61 | furnished to do so, subject to the following conditions: |
| 62 | |
| 63 | The above copyright notice and this permission notice shall be included in all |
| 64 | copies or substantial portions of the Software. |
| 65 | |
| 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 72 | SOFTWARE.` |
| 73 | await writeFile(resolve(options.dir, './LICENSE.txt'), MIT) |
| 74 | } |
| 75 | |
| 76 | async function updateMeta(options: CreateThemeOptions) { |
| 77 | const file = await readFile(resolve(options.dir, './src/theme.ts'), 'utf-8') |
no test coverage detected