Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on how to compile source #43

Closed
zardini123 opened this issue Sep 8, 2020 · 4 comments
Closed

Documentation on how to compile source #43

zardini123 opened this issue Sep 8, 2020 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@zardini123
Copy link

I would like to contribute to this project, but I have no idea how to compile the source. Having a short description/tutorial on how to compile the source in the README would be greatly appreciated.

For example, being that this is an electron application: Do I need to install npm? How do I initialize the packages? What command do I run to get a binary?

Thank you very much!

@evsar3
Copy link
Owner

evsar3 commented Sep 8, 2020

Hi,

If you already have Node.js installed in your computer, you already has NPM on it.
To check if you have them installed, try in your console:
node -v and npm -v

To setup the project follow these steps:

  • Fork this project in your account
  • Clone the forked project in your computer
  • Run npm install in the project's folder to install all dependencies (it must take a few minutes)

For coding, I recommend using Visual Studio Code with this plugins:

  • Vetur (Vue.js plugin)
  • ESlint (linter for JavaScript)

The code style used is StandardJS which is automatically enforced by ESlint.

In order to run the project in development mode, execute:

npm run dev

Any changes in the source will automatically be reflected in the running instance of the Manager.

To build the application and generate an installer binary, run:

npm run build

After done with your awesome code, commit and push to your forked repository; then you can create a pull request.

I will be glad to answer any more questions. Hope you enjoy the project.

@zardini123
Copy link
Author

Wow, thank you! This is very detailed! Thank you for for the plugin recommendations as well, along with stating your code style! This would be great information to include in the README!

@evsar3 evsar3 added the help wanted Extra attention is needed label Sep 8, 2020
@evsar3
Copy link
Owner

evsar3 commented Sep 9, 2020

I will include a contributing guide in next stable release

@peteromano
Copy link

Environment Setup

# compose.yml

services:
  electron:
    build:
      context: .
    tty: true
    stdin_open: true
    environment:
      DISPLAY: ${DISPLAY:-:0}
      LIBGL_ALWAYS_INDIRECT: 1
    ports:
      - "5858:5858"
    volumes:
      - .:/app
# Dockerfile

FROM node:14

RUN apt update

RUN apt-get install -y \
    libc6 \
    libxcomposite1 \
    libxdamage1 \
    libxext6 \
    libxrender1 \
    libxkbcommon0 \
    libglib2.0-0 \
    libgtk-3-0 \
    libnotify4 \
    libnss3 \
    libcairo2 \
    libpango-1.0-0 \
    libgconf-2-4 \
    libasound2 \
    libxrandr2 \
    libatk1.0-0 \
    libatk-bridge2.0-0 \
    libatspi2.0-0 \
    libdrm2 \
    libgbm1 \
    libx11-xcb1 \
    libxss1

RUN apt-get install -y \
  libgl1-mesa-dri
# libnvidia-gl-440

RUN apt-get install -y xvfb

COPY docker-entrypoint.sh /bin/docker-entrypoint.sh
ENTRYPOINT ["/bin/docker-entrypoint.sh"]

WORKDIR /app

RUN chown node:node /app

USER node

ENV FORCE_COLOR=1

CMD ["npm", "run", "dev"]
# docker-entrypoint.sh

#!/bin/bash

echo "Installing npm packages..."
npm install

# xvfb-run --auto-servernum --server-args='-screen 0 1024x768x24' $@
exec $@

Additional Notes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants