Skip to content

minimalist cli tool to generate DroidScript projects

Notifications You must be signed in to change notification settings

rodnye/ds-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DroidScript Builder

CLI tool to transpile and prepare a DroidScript project starting an application with NodeJS

Setup

Copy and run the following command:

npm install -g ds-builder@github:rodnye/ds-builder

After that step you will be able to use the ds-builder command in your terminal.

CLI

init

ds-builder init [<app-name>] [flags]

This initializes a droidscript.json file needed to compile. The name of the application, if not specified, will be taken by default from the package.json

Recomended:

ds-builder init -t

Flags:

flags desc
-t, --template Initialize from a default base template

Example:

ds-builder init "Hello World" --template

build

ds-builder build [flags]

Process and build a new DroidScript project in the destination folder default, then it can be opened and compiled from the app.

Flags:

flags desc
--prod, --production Transpile and minify all JavaScript files

droidscript.json

It specifies the paths and files that will be taken into account when build

name

The name of application.

version

The version of the application, this value is irrelevant, it will not be taken into account in the construction.

ds_version

The version of DroidScript being used.

main

Main javascript file where the app will be executed

icon

Apk icon when compiled

dist

Build destination folder

root

Directory where the other javascript files will be obtained from which the main one will use.

folders

Object that will contain the name of additional folders and their location to be copied.
They can only be used:

  • Html
  • Snd
  • Img
  • Misc

build

The build.json of droidscript project

Example a droidscript.json

{
  "name": "Hello World",
  "version": "1.01",
  "ds_version": "2.50",
  "root": "./droid",
  "main": "./droid/app.js",
  "icon": "./droid/icon.png",
  "folders": {
    "Html": "./src"
  },
  "dist": "/sdcard/Android/data/com.smartphoneremote.androidscriptfree/files/DroidScript",
  "build": {
    "autoPermissions": false,
    "manifest": {
      "minSdkVersion": 23,
      "targetSdkVersion": 28,
      "debuggable": false,
      "homeScreen": false,
      "removePermissions": "WRITE_EXTERNAL_STORAGE"
    }
  }
}

About

minimalist cli tool to generate DroidScript projects

Topics

Resources

Stars

Watchers

Forks