CLI tool to transpile and prepare a DroidScript project starting an application with NodeJS
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.
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
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 |
It specifies the paths and files that will be taken into account when build
The name of application.
The version of the application, this value is irrelevant, it will not be taken into account in the construction.
The version of DroidScript being used.
Main javascript file where the app will be executed
Apk icon when compiled
Build destination folder
Directory where the other javascript files will be obtained from which the main one will use.
Object that will contain the name of additional folders and their
location to be copied.
They can only be used:
- Html
- Snd
- Img
- Misc
The build.json
of droidscript project
{
"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"
}
}
}