diff --git a/.gitignore b/.gitignore index 15ddae5..0a6eb18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ config.yaml +docker-compose.yml */*_modules/ .coverage .cache -docker-compose.yml +client/public diff --git a/client/build.js b/client/build.js index dd63a5f..ce91b8d 100755 --- a/client/build.js +++ b/client/build.js @@ -203,7 +203,9 @@ function bundleConfig() { function bundleBinaryAssets() { fs.copyFileSync('./img/favicon.png', './public/img/favicon.png'); fs.copyFileSync('./img/transparency_grid.png', './public/img/transparency_grid.png'); + console.info('Copied Images'); + fs.copyFileSync('./fonts/open_sans.woff2', './public/fonts/open_sans.woff2') for (let file of glob.sync('./node_modules/font-awesome/fonts/*.*')) { if (fs.lstatSync(file).isDirectory()) { continue; @@ -255,8 +257,24 @@ function bundleWebAppFiles() { }); } +function makeOutputDirs() { + const dirs = [ + './public', + './public/css', + './public/fonts', + './public/img', + './public/js' + ]; + for (let dir of dirs) { + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, 0o755); + } + } +} + // ------------------------------------------------- +makeOutputDirs(); bundleConfig(); bundleBinaryAssets(); bundleWebAppFiles(); diff --git a/client/public/fonts/open_sans.woff2 b/client/fonts/open_sans.woff2 similarity index 100% rename from client/public/fonts/open_sans.woff2 rename to client/fonts/open_sans.woff2 diff --git a/client/public/.gitignore b/client/public/.gitignore deleted file mode 100644 index 2e4c0a2..0000000 --- a/client/public/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -data/ -manifest.json -index.htm diff --git a/client/public/css/.gitignore b/client/public/css/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/client/public/css/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/client/public/fonts/.gitignore b/client/public/fonts/.gitignore deleted file mode 100644 index b1f4eac..0000000 --- a/client/public/fonts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!open_sans.woff2 -!.gitignore diff --git a/client/public/img/.gitignore b/client/public/img/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/client/public/img/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/client/public/js/.gitignore b/client/public/js/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/client/public/js/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore