replace chalk with clorox

This commit is contained in:
Luke Edwards
2018-03-10 12:30:36 -08:00
parent fb24c862f3
commit dd39909371
5 changed files with 25 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
import * as fs from 'fs';
import chalk from 'chalk';
import * as clorox from 'clorox';
export default async function upgrade() {
const upgraded = [
@@ -27,10 +27,10 @@ async function upgrade_sapper_main() {
if (/\%sapper\.main\%/.test(template)) {
if (!pattern.test(template)) {
console.log(chalk.red(`Could not replace %sapper.main% in ${file}`));
console.log(clorox.red(`Could not replace %sapper.main% in ${file}`));
} else {
write(file, template.replace(pattern, `%sapper.scripts%`));
console.log(chalk.green(`Replaced %sapper.main% in ${file}`));
console.log(clorox.green(`Replaced %sapper.main% in ${file}`));
replaced = true;
}
}
@@ -50,4 +50,4 @@ function read(file: string) {
function write(file: string, data: string) {
fs.writeFileSync(file, data);
}
}