GithubHelp home page GithubHelp logo

ethanmoffat / eomap-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cirras/eomap-js

0.0 0.0 0.0 2.11 MB

Endless Map Editor

Home Page: https://eomap.dev

License: MIT License

Shell 0.01% JavaScript 99.33% CSS 0.58% HTML 0.08%

eomap-js's Introduction

eomap-js

Quality Gate Status Format Build Release

An Endless Map File (EMF) editor written in JavaScript.

Requirements

Node.js is required to install dependencies and run scripts via npm.

Available Commands

Command Description
npm install Install project dependencies
npm start Build electron and open application
npm run start:web Build web and open web server running project
npm run start:electron Build electron and open application
npm run dist Build web and electron with production settings
npm run dist:web Build web with production settings
npm run dist:electron Build electron with production settings
npm run format Format changed files using Prettier

Writing Code

After cloning the repo, run npm install from your project directory. Then, you can start the application by running npm start.

After starting the application with npm start, webpack will automatically recompile and reload the application when source files change.

Deploying to Web

After you run the npm run dist:web command, the project will be built into dist/web.

If you put the contents of the dist/web folder in a publicly-accessible location (say something like https://example.com), you should be able to open https://example.com/index.html and use the application.

Configure your web server to use ETags for cache validation.

Connected Mode

In the application settings, you will find a section called Connected Mode. When Connected Mode is enabled, graphics will be loaded from the remote Mapper Service specified by the Mapper Service URL setting.

Hosting a Mapper Service

Currently, the steps for creating your own Mapper Service are:

  • Set up a web server
  • Configure your web server to use ETags for cache validation.
  • Configure your web server for CORS
  • Serve EGF files from /gfx
  • Serve Mapper Assets from /assets
    • Copy the bundled assets out from src/assets/bundled

Forced Connected Mode

If you're hosting an instance of eomap-js and want to lock it to a particular remote Mapper Service, then you can use the FORCE_CONNECTED_MODE_URL environment variable.

When FORCE_CONNECTED_MODE_URL is defined, Connected Mode will be forcibly enabled and the Mapper Service URL will be locked to the specified URL.

Usage examples:

  • npm run start:web -- --env FORCE_CONNECTED_MODE_URL="https://example.com"
  • npm run dist:web -- --env FORCE_CONNECTED_MODE_URL="https://example.com"

eomap-js's People

Contributors

cirras 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.