(path: string)
| 54 | } |
| 55 | |
| 56 | function createIfMissing(path: string): Rule { |
| 57 | return (tree, context) => { |
| 58 | if (tree.exists(path)) { |
| 59 | context.logger.info(`Skipping creation of already existing environment file "${path}".`); |
| 60 | } else { |
| 61 | tree.create(path, ENVIRONMENT_FILE_CONTENT); |
| 62 | } |
| 63 | }; |
| 64 | } |
| 65 | |
| 66 | function log(type: 'info' | 'warn' | 'error', text: string): Rule { |
| 67 | return (_, context) => context.logger[type](text); |
no test coverage detected