Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames llama-pack => BubbleWrap #121

Merged
merged 3 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
# 🦙Llama Pack
![Node CI Status](https://github.com/GoogleChromeLabs/llama-pack/workflows/Node%20CI/badge.svg)
# Bubblewrap
![Node CI Status](https://github.com/GoogleChromeLabs/bubblewrap/workflows/Node%20CI/badge.svg)

Llama Pack is a set of tools and libraries designed to help developers to create, build and update
Bubblewrap is a set of tools and libraries designed to help developers to create, build and update
projects for Android Applications that launch Progressive Web App (PWA) using
[Trusted Web Activity (TWA)](https://developers.google.com/web/updates/2019/02/using-twa).

**Important:** llama-pack is still under active development. The tool hasn't been tested on a wide
range of Web APKs, and bootstraping a new project may fail in those cases. Please, file issues,
feature requests, and contribute with pull requests, if possible.

## Requirements
- [Node.js](https://nodejs.org/en/) 10.0 or above

## llama-pack Components
## Bubblewrap Components

- **[llama-pack-core](./packages/core):** a javascript library for generating, building and updating TWA projects.
- **[llama-pack-cli](./packages/cli):** a command-line version for llama-pack.
- **[bubblewrap/core](./packages/core):** a javascript library for generating, building and updating TWA projects.
- **[bubblewrap/cli](./packages/cli):** a command-line version of Bubblewrap.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/GoogleChromeLabs/llama-pack.git"
"url": "git+https://github.com/GoogleChromeLabs/bubblewrap.git"
},
"author": "",
"license": "Apache-2.0",
Expand Down
28 changes: 12 additions & 16 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
# 🦙Llama Pack CLI
![Node CI Status](https://github.com/GoogleChromeLabs/llama-pack/workflows/Node%20CI/badge.svg)
# Bubblewrap CLI
![Node CI Status](https://github.com/GoogleChromeLabs/bubblewrap/workflows/Node%20CI/badge.svg)

Llama Pack is a Command Line Interface (CLI) that helps developers to create
Bubblewrap is a Command Line Interface (CLI) that helps developers to create
a Project for an Android application that launches an existing Progressive Web App (PWA) using a
[Trusted Web Activity (TWA)](https://developers.google.com/web/updates/2019/02/using-twa).

**Important:** llama-pack is still under active development. The tool hasn't been tested on a wide
range of Web APKs, and bootstraping a new project may fail in those cases. Please, file issues,
feature requests, and contribute with pull requests, if possible.

## Requirements
- [Node.js](https://nodejs.org/en/) 10.0 or above

## Setting up the Environment

### Get the Java Development Kit (JDK) 8.
The Android Command line tools requires the correct version of the JDK to run. To prevent version
conflicts with a JDK version that is already installed, llama-pack uses a JDK that can unzipped in
conflicts with a JDK version that is already installed, Bubblewrap uses a JDK that can unzipped in
a separate folder.

Download a version of JDK 8 that is compatible with your OS from
Expand All @@ -47,35 +43,35 @@ Download a version of Android command line tools that is compatible with your OS
[https://developer.android.com/studio#command-tools](https://developer.android.com/studio#command-tools).
Create a folder and extract the downloaded file into it.

### Tell llama-pack where the JDK and Android command line tools are
When running `llama-pack` for the first time, it will ask where it can find the JDK and Android command
### Tell Bubblewrap where the JDK and Android command line tools are
When running `bubblewrap` for the first time, it will ask where it can find the JDK and Android command
line tools. So, take note of the location where both were decompressed.


## Using llama-pack
## Using Bubblewrap

### Installing llama-pack
### Installing Bubblewrap

```shell
npm i -g @llama-pack/cli
npm i -g @bubblewrap/cli
```

### Initializing an Android Project
Generate an Android project from an existing Web Manifest:

```shell
llama-pack init --manifest https://my-twa.com/manifest.json
bubblewrap init --manifest https://my-twa.com/manifest.json
```

When initalizing a project, llama-pack will download the Web Manifest and ask you to confirm
When initalizing a project, Bubblewrap will download the Web Manifest and ask you to confirm
the values that should be used when building the Android project.

It will also ask you for the details needed to generate a signing key, used to sign the
app before uploading to the Play Store.

### Building the Android Project
```shell
llama-pack build
bubblewrap build
```

When building the project for the first time, the Android Build Tools will need to be installed.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.5.1",
"description": "CLI tool to Generate TWA projects from a Web Manifest",
"bin": {
"llama-pack": "bin/llama-pack.js"
"bubblewrap": "bin/bubblewrap.js"
},
"scripts": {
"build": "tsc",
Expand All @@ -17,7 +17,7 @@
"keywords": [],
"repository": {
"type": "git",
"url": "git+https://github.com/GoogleChromeLabs/llama-pack.git"
"url": "git+https://github.com/GoogleChromeLabs/bubblewrap.git"
},
"author": "",
"license": "Apache-2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/lib/cmds/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ interface SigningKeyPasswords {
*/
async function getPasswords(log: Log): Promise<SigningKeyPasswords> {
// Check if passwords are set as environment variables.
const envKeystorePass = process.env['LLAMA_PACK_KEYSTORE_PASSWORD'];
const envKeyPass = process.env['LLAMA_PACK_KEY_PASSWORD'];
const envKeystorePass = process.env['BUBBLEWRAP_KEYSTORE_PASSWORD'];
const envKeyPass = process.env['BUBBLEWRAP_KEY_PASSWORD'];

if (envKeyPass !== undefined && envKeystorePass !== undefined) {
log.info('Using passwords set in the LLAMA_PACK_KEYSTORE_PASSWORD and ' +
'LLAMA_PACK_KEY_PASSWORD environmental variables.');
log.info('Using passwords set in the BUBBLEWRAP_KEYSTORE_PASSWORD and ' +
'BUBBLEWRAP_KEY_PASSWORD environmental variables.');
return {
keystorePassword: envKeystorePass,
keyPassword: envKeyPass,
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/lib/cmds/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ import {ParsedArgs} from 'minimist';
const HELP_MESSAGES = new Map<string, string>(
[
['main', [
'llama-pack [command] <options>',
'bubblewrap [command] <options>',
'',
'',
'build ............... generates an Android APK from a TWA Project',
'help ................ shows this menu',
'init ................ initializes a new TWA Project',
'update .............. updates an existing TWA Project with the latest llama-pack template',
'update .............. updates an existing TWA Project with the latest bubblewrap template',
].join('\n')],
['init', [
'Usage:',
'',
'',
'lama-pack init --manifest=[web-manifest-url]',
'bubblewrap init --manifest=[web-manifest-url]',
'',
'',
'Options:',
Expand All @@ -43,13 +43,13 @@ const HELP_MESSAGES = new Map<string, string>(
'Usage:',
'',
'',
'llama-pack build',
'bubblewrap build',
].join('\n')],
['update', [
'Usage:',
'',
'',
'llama-pack update',
'bubblewrap update',
'',
'',
'Options:',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

export const APP_NAME = 'llama-pack-cli';
export const APP_NAME = 'bubblewrap-cli';
17 changes: 7 additions & 10 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
# 🦙Llama Pack Core
![Node CI Status](https://github.com/GoogleChromeLabs/llama-pack/workflows/Node%20CI/badge.svg)
# Bubblewrap Core
![Node CI Status](https://github.com/GoogleChromeLabs/bubblewrap/workflows/Node%20CI/badge.svg)

Llama Pack Core is a NodeJS library that helps developers to create a Project for an Android
Bubblewrap Core is a NodeJS library that helps developers to create a Project for an Android
application that launches an existing Progressive Web App (PWA) using a
[Trusted Web Activity (TWA)](https://developers.google.com/web/updates/2019/02/using-twa).

**Important:** llama-pack is still under active development. The tool hasn't been tested on a wide
range of Web APKs, and bootstraping a new project may fail in those cases. Please, file issues,
feature requests, and contribute with pull requests, if possible.

## Requirements
- [Node.js](https://nodejs.org/en/) 10.0 or above

## Setting up the Environment

### Get the Java Development Kit (JDK) 8.
The Android Command line tools requires the correct version of the JDK to run. To prevent version
conflicts with a JDK version that is already installed, llama-pack uses a JDK that can unzipped in
conflicts with a JDK version that is already installed, Bubblewrap uses a JDK that can unzipped in
a separate folder.

Download a version of JDK 8 that is compatible with your OS from
Expand All @@ -47,10 +43,10 @@ Download a version of Android command line tools that is compatible with your OS
[https://developer.android.com/studio#command-tools](https://developer.android.com/studio#command-tools).
Create a folder and extract the downloaded file into it.

## Using llama-pack-core in a NodeJs project
## Using @bubblewrap/core in a NodeJs project

```shell
npm i -g @llama-pack/core
npm i -g @bubblewrap/core
```

## Contributing
Expand All @@ -64,3 +60,4 @@ See [LICENSE](../../LICENSE) for more.
## Disclaimer

This is not a Google product.

2 changes: 1 addition & 1 deletion packages/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/GoogleChromeLabs/llama-pack.git"
"url": "git+https://github.com/GoogleChromeLabs/bubblewrap.git"
},
"author": "",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/TwaGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class TwaGenerator {
}

// TODO(andreban): Support for image/svg being tracked in
// https://github.com/GoogleChromeLabs/llama-pack/issues/103
// https://github.com/GoogleChromeLabs/bubblewrap/issues/103
if (contentType.startsWith('image/svg')) {
throw new Error(`Received icon "${iconUrl}" with Content-Type "${contentType}",` +
' which is not currently supported');
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/androidSdk/AndroidSdkTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class AndroidSdkTools {
* Constructs a new instance of AndroidSdkTools.
*
* @param {NodeJS.Process} process information from the OS process
* @param {Config} config the llama-pack general configuration
* @param {Config} config the bubblewrap general configuration
* @param {jdkHelper} jdkHelper the JDK information to be used by the Android SDK
*/
constructor(process: NodeJS.Process, config: Config, jdkHelper: JdkHelper) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/jdk/JdkHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class JdkHelper {
* Constructs a new instance of JdkHelper.
*
* @param {NodeJS.Process} process information from the OS process
* @param {Config} config the llama-pack general configuration
* @param {Config} config the bubblewrap general configuration
*/
constructor(process: NodeJS.Process, config: Config) {
this.process = process;
Expand Down