Giter VIP home page Giter VIP logo

mindustry-mods's Introduction

Mindustry Mods

Checkout the website here: https://simonwoodburyforget.github.io/mindustry-mods/

Add mods to listing here: https://github.com/SimonWoodburyForget/mindustry-mods/blob/master/CONTRIBUTING.md

Python Scripts

Executing

Python scripts are used to update data in dist/data/modmeta.*.json which is used by the frontend. Before changing data cargo test is run, and if errors are found, the old data is reused instead.

Data is currently cached in ~/.github-cache, and if Git hashes don't change, the specific repository is skipped.

python3.8 scripts/mindustry-mods.py -iph

This would executing the script hourly. The --help argument can be used to get more information. This assumes you're running the script from the current directory, and -d is just the path back to the root directory.

Rust Frontend

  • rustc 1.39.0

Setup

Simply install Rust through rustup, this tool can install Rust and it's build tool Cargo.

wasm-pack

cargo install wasm-pack

wasm-pack is used to build and package the Wasm file for the browser (currently done without a bundler).

make

sudo apt install make

make just runs the local Makefile, nothing fancy here.

Building

To build the Wasm file just run the following:

make build

This will run the wasm-dist task in frontend/Makefile.toml, which will run wasm-pack on top of a few commands, which will move the ./pkg into the right place.

Testing

Unit Tests

cargo test

Fastest way to get a result is through cargo test.

Runner

cd dist
python3.8 -m http.server 9000

Running the app will give more conclusive results on what you actually did. You want to run a server from the generated dist/ directory.

A Python file server is being used, openning the browser at localhost:9000 will show the browser app running. Using the latest version of Python will ensure the correct wasm mimetype exists, which make not be the case in your existing Python 3 version.

Publishing

  • gh-pages 2.2.0

The standard gh-pages npm tool is used to publish to the gh-pages branch. If anything that's the only reason npm is here.

mindustry-mods's People

Contributors

dependabot[bot] avatar simonwoodburyforget avatar vortetty avatar deltanedas avatar avitran0 avatar meepoffaith avatar zomadestuff avatar

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.