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 @@ + +

Splork MOTD ()

diff --git a/rollup.config.mjs b/rollup.config.mjs index e8ff57a..92ff5eb 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -11,7 +11,7 @@ export default { // Entry point for application build; can specify a glob to build multiple // HTML files for non-SPA app html({ - input: 'public/**.html', + input: 'dist/**.html', }), // Resolve bare module specifiers to relative paths resolve(), diff --git a/src/Splork.ts b/src/Splork.ts index cb7ed95..21dd7d5 100644 --- a/src/Splork.ts +++ b/src/Splork.ts @@ -41,7 +41,6 @@ export class Splork extends LitElement { override render() { return html`
-
Splork MOTD
${this.value}
`;