diff --git a/.gitignore b/.gitignore index 1bc444a..3e8400f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ lerna-debug.log* certs/ build/ public/js/ +dist/ # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/gulpfile.js b/gulpfile.js index 2af7614..03ba8e9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,11 +4,16 @@ require('dotenv/config'); // or replace multiple strings function replaceTemplate() { - return src(['./public/js/**/*.js']) + src(['./dist/js/**/*.js']) .pipe(replace(/TEASENSE_URI/g, process.env.TEASENSE_URI)) .pipe(replace(/RAINFALL_URI/g, process.env.RAINFALL_URI)) .pipe(replace(/SPLORK_URI/g, process.env.SPLORK_URI)) - .pipe(dest('./public/js')); + .pipe(dest('./dist/js')); + + return src(['./dist/**/*.html']) + .pipe(replace(/FONTAWESOME_SCRIPT_URL/g, process.env.FONTAWESOME_SCRIPT_URL)) + .pipe(dest('./dist/')); + }; exports.default = replaceTemplate; \ No newline at end of file diff --git a/package.json b/package.json index 0d3ee64..478cfe3 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "", "main": "index.js", "scripts": { - "start": "npx tsc && npx gulp && npx rollup -c", - "clean": "rm -rf build", + "start": "npx tsc && cp -R public dist && npx gulp && npx rollup -c", + "clean": "rm -rf build && rm -rf dist", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", diff --git a/public/splork.html b/public/splork.html index f3c3d0b..432737e 100644 --- a/public/splork.html +++ b/public/splork.html @@ -1,8 +1,10 @@
+ +