Coder Social home page Coder Social logo

Comments (5)

emilk avatar emilk commented on July 17, 2024

That sounds like a good idea! Would you like to contribute it?

from eframe_template.

yusdacra avatar yusdacra commented on July 17, 2024

Sure! I can go with the branch approach and link that in the README.md, which should be okay I think.

from eframe_template.

emilk avatar emilk commented on July 17, 2024

I think a separate folder is better first step (easier to keep up-to-date). If it works well, we can maybe switch it to be the default :)

from eframe_template.

coderedart avatar coderedart commented on July 17, 2024

so, i tried doing this https://github.com/coderedart/eframe_template .

it was pretty easy to do.

most of the work is in https://github.com/coderedart/eframe_template/commit/b25fc179130da765e6cdee8f2bc29bd219e33373 commit. just needed to add the copy commands, comment out the custom wasm_bindgen stuff from index.html, add the start function to main.rs and finally set the favicon (in another commit).

I added a separate pages.yml to automate the publishing to github pages part.

  1. I set the tags as the trigger, but personally, i would just use the push as trigger to keep the live version up to date with the master branch. i will leave this decision to you on what triggers to use.
  2. I use a separate branch for the live build instead of building and committing the latest live build in docs/ folder. I felt there's no point in actually committing the temporary builds of js / wasm to git history of the source repo itself.
  3. live build link: https://coderedart.github.io/eframe_template/
  4. I also use rust-cache action to cache the rust artefacts. when you are often just fixing tiny little things in commits, there's no point in recompiling from scratch :)
  5. the most important part is that even if it is not used, i think providing a commented out version will be useful for people who want to use this. this workflow stuff (especially with wasm) is not easy to setup. speaking as a newbie that had to mess around for an hour to figure out that i needed to use --public-url option with github repo name or trunk can't set the relative paths right

anyway, i accidentally clicked use template button instead of fork, so i will need to make a new PR anyway. just wanted to know if any changes are required before i start the PR (or if anyone else wants to take this and add more stuff).

from eframe_template.

coderedart avatar coderedart commented on July 17, 2024

forgot to mention that trunk uses /dist folder and not docs by default to build the website and i added it to .gitignore as that's what most people would do.

EDIT: even if the workflow runs, you must also go to github repo -> settings -> pages -> source -> set to branch : gh-pages + /(root) as source and click on save. only after that will pages-build-deployment action will run (everytime there's a push to gh-pages by our pages.yaml workflow) and deploy the latest files to servers.

from eframe_template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.