defiant-builder
Advanced tools
Comparing version 1.6.5 to 1.6.7
@@ -361,2 +361,3 @@ | ||
let license = getMetaValue(meta, "license") | ||
let oauth = getMetaValue(meta, "oauth") | ||
@@ -422,2 +423,13 @@ // perform build tasks - if any | ||
if (oauth) { | ||
// copy oauth-file to public, if exist | ||
let srcOauth = FS.path.join(options.source, oauth) | ||
if (await FS.fileExists(srcOauth)) { | ||
let destOauth = FS.path.join(destDir, oauth) | ||
await FS.copyFile(srcOauth, destOauth) | ||
} else { | ||
return reject("Couldn't locate OAuth file: "+ oauth) | ||
} | ||
} | ||
let stat = await FS.fileStat(destDir) | ||
@@ -436,2 +448,3 @@ let files = [destFile] | ||
await Promise.all(files.map(async entry => { | ||
if (oauth && entry === oauth) return | ||
let filePath = FS.path.join(destDir, entry) | ||
@@ -474,3 +487,6 @@ | ||
await Promise.all(files.map(async entry => { | ||
if (entry === "icon.svg") { | ||
let rootFiles = ["icon.svg"] | ||
if (oauth) rootFiles.push(oauth) | ||
if (rootFiles.includes(entry)) { | ||
let iconPath = FS.path.join(destDir, entry) | ||
@@ -477,0 +493,0 @@ let file = await FS.readFile(iconPath) |
{ | ||
"name": "defiant-builder", | ||
"version": "1.6.5", | ||
"version": "1.6.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
@@ -11,6 +11,7 @@ | ||
let runIt = async () => { | ||
let b = await Build({ source, destination, uglify, compress }) | ||
// console.log(b) | ||
Build({ source, destination, uglify, compress }) | ||
.then(success => console.log("Done!")) | ||
.catch(e => console.log(e)) | ||
} | ||
runIt() | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55628
524