Skip to content

Commit

Permalink
install chalk-template as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sporeball committed Jun 22, 2022
1 parent f1eed9a commit 82960e5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 17 deletions.
5 changes: 3 additions & 2 deletions index.js
Expand Up @@ -7,6 +7,7 @@
*/

// dependencies
import chalkTemplate from 'chalk-template';
import chalk from 'chalk';

let contents;
Expand Down Expand Up @@ -108,7 +109,7 @@ const instructions = {
warn('program halted');
console.log(trace());
if (output === '') {
console.log(chalk`{gray (no output)}`);
console.log(chalkTemplate`{gray (no output)}`);
} else {
console.log(`output: ${output}`);
}
Expand Down Expand Up @@ -325,7 +326,7 @@ export default async function parse (c, file, inp, unlimited) {
}

if (output === '') {
return chalk`{gray (no output)}`;
return chalkTemplate`{gray (no output)}`;
} else {
return `output: ${output}`;
}
Expand Down
5 changes: 3 additions & 2 deletions naz.js
Expand Up @@ -7,6 +7,7 @@

import parse from './index.js';

import chalkTemplate from 'chalk-template';
import chalk from 'chalk';
import eol from 'eol';
import fs from 'fs';
Expand Down Expand Up @@ -65,13 +66,13 @@ function naz () {
const tEnd = performance.now();
const time = (tEnd - tStart).toFixed(0);

console.log(chalk`{green finished} {cyan in ${time}ms}`);
console.log(chalkTemplate`{green finished} {cyan in ${time}ms}`);
console.log(result);
});
}

const runnerErr = str => {
console.log(chalk`{red error:} ${str}`);
console.log(chalkTemplate`{red error:} ${str}`);
process.exit(1);
};

Expand Down
65 changes: 52 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -22,6 +22,7 @@
"homepage": "https://github.com/sporeball/naz#readme",
"dependencies": {
"chalk": "^5.0.0",
"chalk-template": "^0.4.0",
"eol": "^0.9.1",
"yeow": "^0.2.0"
},
Expand Down

0 comments on commit 82960e5

Please sign in to comment.