Create .nojekill file

This commit is contained in:
freearhey 2019-11-10 21:00:47 +03:00
parent 69041349a3
commit 3f1235f68a
2 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,8 @@ function main() {
parseIndex() parseIndex()
console.log('Creating root directory...') console.log('Creating root directory...')
createRootDirectory() createRootDirectory()
console.log('Creating .nojekill...')
createNoJekillFile()
console.log('Generating index.m3u...') console.log('Generating index.m3u...')
generateIndex() generateIndex()
console.log('Generating index.country.m3u...') console.log('Generating index.country.m3u...')
@ -39,6 +41,10 @@ function createRootDirectory() {
helper.createDir(ROOT_DIR) helper.createDir(ROOT_DIR)
} }
function createNoJekillFile() {
helper.createFile(`${ROOT_DIR}/.nojekyll`)
}
function parseIndex() { function parseIndex() {
const root = helper.parsePlaylist('index.m3u') const root = helper.parsePlaylist('index.m3u')

View File

@ -104,7 +104,7 @@ helper.appendToFile = function(filename, data) {
fs.appendFileSync(path.resolve(__dirname) + '/../' + 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) fs.writeFileSync(path.resolve(__dirname) + '/../' + filename, data)
} }