Giter Site home page Giter Site logo

yiwang / peruse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshuef/peruse

0.0 2.0 0.0 10.19 MB

Extensible Electron Browser. Built with react/redux. With extensions for The SAFE Network

License: MIT License

JavaScript 97.50% CSS 2.44% HTML 0.06%

peruse's Introduction

Peruse

About

An electron web browser. Built to be a basis. Extendable by design.

Development

There are dev- prefixed releases of Peruse available. These come with both live network and mock network libs, bundled.

By default, opening the app will open Peruse for the live network.

Otherwise, there is the option to pass a --mock flag to the browser (when you're running in a NODE_ENV=dev environment). This will start the browser in a mock network mode.

eg, on OSX:

NODE_ENV=dev open Peruse.app --args --mock

Compiling

Make sure you have both git and yarn installed.

  • git clone https://github.com/joshuef/peruse.git
  • cd peruse
  • NODE_ENV=dev yarn (NODE_ENV is needed to install mock libs and to tun yarn mock-dev).
  • yarn rebuild

And to run dev mode:

  • yarn mock-dev

Want to run 'production' variables, but with hot reloading?

  • yarn prod-dev

Note, you'll need a crust.config set for the application. Helper commands are available on osx/linux (not windows yet, sorry! this is only temporary.)

And to package:

  • yarn package

The resulting packages are contained within the releases folder.

A packaged application, built in a NODE_ENV=dev, can access either prod or dev networks. prod is the default, or alternatively you can open the application and pass a --mock flag to open and use a mock network.

Build commands

There are a few build commands for various situations:

  • yarn mock-dev will run a peruse developer version of the application using MockVault
  • yarn prod-dev will run a peruse developer version of the application using the live network.
  • yarn build compiles all code, but you shouldn't need to use this
  • yarn build-preload will need to be run whenever you change the preload.js file for changes to show up in the browser.

Redux

The core is built around redux for simple state management allowing for easy extensibility.

React

The interface is built in react for simple data flow and clear componentisation.

Webpack

webpack.config.base contains loaders and alias' used across all webpack configs.

There is a prod, config. Alongside renderer configs.

When developing against hot reloading, the vendor setup is used to speed up build times etc.

There are 'dev' mode configs for running against the NODE_ENV=develeopment setup. There are 'live-dev' configs for running against NODE_ENV=production but without needing to package.

Testing

  • yarn test runs jest (you have the optional yarn test-watch, too).
  • yarn test-e2e runs spectron integration tests (not yet stable).
  • yarn lint ...lints...

Logging

Via electron-log: import logger from 'logger', and you can logger.info('things').

Logs are printed to both render console and stdout. Logs are also written to a log file per system.

yarn log-osx will tail the file. Similar commands (as yet untested) exist for linux/windows.

SAFE Network

The safe code is contained within the app/extensions folder. This includes a simple http server with is used to provide the http like functionalities of the safe network.

Currently you need to authenticate against the SAFE Browser to get network access.

Authenticator

Currently, we're using a temp_dist version of the authenticator webapp, prebuilt from the 'beaker-plugin-safe-authenticator'.

  • APIs are located in app/extensions/safe/api;
  • APIs are located in app/extensions/safe/auth-api;

peruse's People

Contributors

akovalyov avatar akozhemiakin avatar amilajack avatar axsaucedo avatar bochaco avatar catalinmiron avatar chentsulin avatar davej avatar domasx2 avatar dplusic avatar dustintownsend avatar epilande avatar g1ibby avatar greenkeeperio-bot avatar hunterlester avatar jefffriesen avatar jhen0409 avatar joshuef avatar kilian avatar knpwrs avatar kubijo avatar longlivechief avatar neighborhood999 avatar piamancini avatar trstringer avatar tsemerad avatar wincent avatar xwartz avatar yeti-or avatar zeevl avatar

Watchers

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