Use path.join(__dirname, ...) to potentially avoid www/js/player.js issue

This commit is contained in:
Calvin Montgomery 2018-04-05 20:48:59 -07:00
parent c1e78fd4dc
commit ef7bf1a319
1 changed files with 7 additions and 2 deletions

View File

@ -30,7 +30,12 @@ var order = [
var buffer = ''; var buffer = '';
order.forEach(function (file) { order.forEach(function (file) {
buffer += fs.readFileSync(path.join('player', file)) + '\n'; buffer += fs.readFileSync(
path.join(__dirname, '..', 'player', file)
) + '\n';
}); });
fs.writeFileSync(path.join('www', 'js', 'player.js'), coffee.compile(buffer)); fs.writeFileSync(
path.join(__dirname, '..', 'www', 'js', 'player.js'),
coffee.compile(buffer)
);