1 const chalk = require('chalk');
2 const fs = require('fs');
3 const log = require('./log');
4 const compile = require('./compile');
6 module.exports = (filePath) => {
7 log(`'${filePath}' is being checked.`);
9 compile(filePath, function check(code) {
10 const fileName = filePath.slice(0, -7);
11 fs.readFile(`${fileName}.js`, function read(err, data) {
17 if (code !== data.toString()) {
18 log(chalk.red(`'${filePath}' is not updated.`));