Giter Site home page Giter Site logo

positron's Introduction

positron

Compile your Javascript apps to Android

positron takes your static web apps and compiles them into a standalone Android app, ready to run on a phone.

Installation

First, make sure you have installed Android Studio and you can run it.

Now, install positron.

$ npm install positron-cli -g

Usage

positron takes a list of files that should be included in the bundle and outputs an .apk to your current directory:

$ positron index.html bundle.js
$ adb install app.apk

You can even run positron * to include all files.

$ positron *
$ adb install app.apk

You can provide a title and package name for your app as well:

$ positron * -t 'ExampleApp' -p 'com.example.app'
$ adb install app.apk

For more info, run positron --help

$ positron --help
Usage:
  positron [options] <path>...

Path is a series of pathnames to files to include in the html rendering.

Options:
  -h --help    Show this help screen
  -p <package> The name of the package. E.g: -p "comm.example.app"
  -t <title>   The name of the app. E.g: -p "ExampleApp". By default, the current directory name
  -o <path>    The path to output the APK. [default: ./app.apk]

How does it work?

positron works by taking a boilerplate Android app with just a single web view, then copying all your static assets in and compiling it. It's surprisingly simple but works well.

Why the name 'positron'?

positron was inspired by Github's Electron. Electron allows you to build native desktop apps using web technologies. positron allows you to build native apps for phones using web technologies. And according to Wikipedia, the opposite of an Electron is a Positron.

positron

positron's People

Contributors

widdershin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

positron's Issues

idea: docker image for builder?

so that you don't have to go through the hassel of setting up all the android stuff it might be easier to run it in a docker on a vps, which would also make it way more reproducable?

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.