Skip to content

Commit

Permalink
Merge pull request yogstation13#1 from Dominig12/update-yog
Browse files Browse the repository at this point in the history
Update yog
  • Loading branch information
Dominig12 authored Jul 27, 2024
2 parents 578b762 + 9a7ceb9 commit 0af15ae
Show file tree
Hide file tree
Showing 77 changed files with 12,525 additions and 13,629 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
dist/
.publish/
_as/
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replays.taucetistation.net
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ See the LICENSE file for license rights and limitations (MIT).
## Installation

0. Have node, npm, and npx installed.
1. Install the [gulp toolkit](https://gulpjs.com).
2. Run `npm install` in the root directory to install the requirements.
3. Run `gulp` to minimize the script.
4. In the created `dist` folder you'll find all deployment-ready scripts, as well as `index.html` which you can open in your browser!
1. Run `npm install` in the root directory to install the requirements.
2. Run `npm run build` to compile the project (`npm run build-prod` to compile the project into production)
4. (local) Run `npm run serve` to start a local server with a hosted project
5. In the created `dist` folder you'll find all deployment-ready scripts, as well as `index.html` which you can open in your browser!
Binary file added cppdemotest.xz
Binary file not shown.
Binary file added favicon.ico
Binary file not shown.
149 changes: 0 additions & 149 deletions index.js

This file was deleted.

27 changes: 0 additions & 27 deletions lib/appearance.js

This file was deleted.

95 changes: 0 additions & 95 deletions lib/draw_batch.js

This file was deleted.

32 changes: 32 additions & 0 deletions lib/html.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {readFileSync} from "fs";
import ejs from "ejs";

function find_chunk(bundle, name) {
for(let item of Object.values(bundle)) {
if(item.name.endsWith(name)) return item;
}
}

function generate_html(bundle, template_path) {
const template = readFileSync(template_path, "utf8");
return ejs.render(template, {
main_bundle: find_chunk(bundle, "main").fileName
});
}

export default function htmlPlugin() {
const template_path = "src/index.ejs";
return {
name: "html-plugin",
buildStart() {
this.addWatchFile(template_path);
},
async generateBundle(options, bundle) {
this.emitFile({
fileName: "index.html",
type: "asset",
source: generate_html(bundle, template_path)
});
}
};
}
Loading

0 comments on commit 0af15ae

Please sign in to comment.