diff --git a/dc09.js b/dc09.js index 1e706d8..db9844f 100644 --- a/dc09.js +++ b/dc09.js @@ -94,6 +94,8 @@ function buildOne(dir) { convertPathsHtml(dir, files) print('Minifying HTML') minifyHtml(dir, files) + print('Copying other files') + copyOther(dir, files) } function minifyJs(dir, files) { @@ -178,6 +180,19 @@ function minifyHtml(dir, files) { } } +function copyOther(dir, files) { + files.other = files.other || [] + for (let file of files.other) { + const isAbs = path.isAbsolute(file) + const name = (isAbs ? file : `${dir}/${file}`) + const built = (isAbs ? file : `dist/${dir}/${file}`) + fs.cpSync(name, built, { + recursive: true, + errorOnExist: false, + }) + } +} + function archive() { exec('7z a dist.zip dist/*') diff --git a/webpage.json b/webpage.json index addf956..649a1f7 100644 --- a/webpage.json +++ b/webpage.json @@ -10,7 +10,7 @@ "js/control.js", "js/handlers.js" ], - "files": [ + "other": [ "img/", "svg/", "fontawesome/", ".domains" ]