| 108 | } |
| 109 | |
| 110 | function ensureNoGitChanges() { |
| 111 | exec('git status --porcelain', (error, stdout, _stderr) => { |
| 112 | if (error) { |
| 113 | console.error(`error calling \`git status\`: ${error}`); |
| 114 | process.exit(1);; |
| 115 | } |
| 116 | if (stdout) { |
| 117 | console.error('Untracked files detected:\n', stdout); |
| 118 | exec('git diff', (error, stdout, _stderr) => { |
| 119 | if (error) { |
| 120 | console.error(`error calling \`git diff\`: ${error}`); |
| 121 | } else { |
| 122 | console.log(`Git diff:\n${stdout}`); |
| 123 | } |
| 124 | process.exit(1); |
| 125 | }); |
| 126 | } |
| 127 | }); |
| 128 | } |
| 129 | |
| 130 | const flavor = process.argv[2] || "vanilla-js"; |
| 131 | |