From 3f1235f68ae4ffb8b62ceb7ecbab6d7bbece9dc1 Mon Sep 17 00:00:00 2001 From: freearhey Date: Sun, 10 Nov 2019 21:00:47 +0300 Subject: [PATCH] Create .nojekill file --- scripts/generate.js | 6 ++++++ scripts/helper.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/generate.js b/scripts/generate.js index 423d74cc3b..d10c89350a 100644 --- a/scripts/generate.js +++ b/scripts/generate.js @@ -14,6 +14,8 @@ function main() { parseIndex() console.log('Creating root directory...') createRootDirectory() + console.log('Creating .nojekill...') + createNoJekillFile() console.log('Generating index.m3u...') generateIndex() console.log('Generating index.country.m3u...') @@ -39,6 +41,10 @@ function createRootDirectory() { helper.createDir(ROOT_DIR) } +function createNoJekillFile() { + helper.createFile(`${ROOT_DIR}/.nojekyll`) +} + function parseIndex() { const root = helper.parsePlaylist('index.m3u') diff --git a/scripts/helper.js b/scripts/helper.js index d4ec61b0f5..2e780bdecb 100644 --- a/scripts/helper.js +++ b/scripts/helper.js @@ -104,7 +104,7 @@ helper.appendToFile = function(filename, data) { fs.appendFileSync(path.resolve(__dirname) + '/../' + filename, data) } -helper.createFile = function(filename, data) { +helper.createFile = function(filename, data = '') { fs.writeFileSync(path.resolve(__dirname) + '/../' + filename, data) }