Giter Site home page Giter Site logo

status-electron's Introduction

status-desktop

Status Desktop (React Native Web and Electron)

Checkout https://github.com/status-im/status-react/tree/feature/status-electron branch into status-react folder

You should have status-react and status-electron in the same directory

+-- status-dev-folder
|   +-- status-react // status-react repo (https://github.com/status-im/status-react) `feature/status-electron` branch
|   +-- status-electron // this repo

Make simlink to resources folder

ln -s /Users/*/status-dev-folder/status-react/resources /Users/*/status-dev-folder/status-electron/resources

Requirements

  • leiningen 2.6.x +
  • node v8.x.x (important to have exactly 8 version not 7 and not 9)
  • electron v1.8.2-beta.3 +

Project Directory

see your app dir. looks like

.
+-- README.md
+-- app
|   +-- dev // development mode dir
|   |   +-- index.html // entry html file
|   |   +-- js
|   |   |   +-- main.js
|   |   +-- package.json // for Desktop app
|   +-- prod // production mode dir
|       +-- index.html // entry html file
|       +-- js
|       |   +-- main.js
|       +-- package.json // for Desktop app
+-- package.json // for Compile
+-- project.clj // compile settings desktop app
+-- resources
+-- src
|   +-- status_desktop
|       +-- core.cljs // ClojureScript for Electron in here
+-- src_front
|   +--status_desktop_front
|      +-- core.cljs //  Status ClojureScript enter point in here
+-- src_front_profile
    +--status_desktop_front
       +-- dev
       |   +-- init.cljs
       +-- prod
           +-- init.cljs

Usage

step 1

Install electron If not already installed

npm install -g electron@beta

Install npm modules

npm install

Check node version

node -v it should be 8.x.x if not switch to 8.x.x version n 8.9.1

step 2

run cljsbuild lein desktop-once.

$ lein desktop-once

Compiling ClojureScript.
Compiling "app/js/cljsbuild-main.js" from ["src"]...
Successfully compiled "app/js/cljsbuild-main.js" in 10.812 seconds.
...
Successfully compiled "app/dev/js/front.js" in 10.588 seconds.

step 3

You can run Desktop application.

development mode

development mode use figwheel. run alias desktop-figwheel. before run application. Open other terminal window.

$ lein desktop-figwheel

and you can run Electron(Atom-Shell) app.

On OS X:

$ electron app/dev

On Linux:

$ ./electron/electron app/dev

On Windows:

$ .\electron\electron.exe app/dev

production mode

you can run Electron(Atom-Shell) app.

On OS X:

$ electron app/prod

On Linux:

$ ./electron/electron app/prod

On Windows:

$ .\electron\electron.exe app/prod

Package App

(If not already installed Electron-packager.)

$ npm install -g electron-packager

run command

for OSX

$ lein desktop-app-osx

for OSX app store

$ desktop-app-store

for windows 32bit app

$ desktop-app-win32

for windows 64bit app

$ desktop-app-win64

for linux

$ desktop-app-linux

Aliases

you can use aliases in project directory.

$ lein desktop-figwheel      # start figwheel
$ lein desktop-once          # build JavaScript for develop 
$ lein desktop-prod          # build JavaScript for production

Contact us

Feel free to email us at [email protected] or better yet, join our Riot.

License

Licensed under the Mozilla Public License v2.0

status-electron's People

Contributors

flexsurfer avatar chadyj avatar

Watchers

 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.