Plaoc App

BFChainAugust 11, 2023About 1 min

Plaoc App

Overview

We refer to applications that run on the dweb_browser browser as Plaoc Apps. First we need to understand how to package our app into a .zip file.

Plaoc App Creation Process:

Using Vue + Vite as an example:

  • Globally install @vue/cli

    pnpm add -g @vue/cli
    
  • Test the installation was successful

    vue --version
    

    Terminal output indicates successful install:

    @vue/cli 5.0.8
    
  • Create Vue project

    vue create plaoc-app
    
  • Create manifest.json file in plaoc-app root directory

    plaoc-app
    ├── ......other project files 
    └── mainifest.json
    
  • Install @plaoc/cli

    pnpm add @plaoc/cli
    
  • Update package.json with command:

    "scripts": {
      "serve": "vue-cli-service serve",
      "build": "vue-cli-service build",
      "lint": "vue-cli-service lint",
      // Add plaoc command
      "plaoc:serve": "plaoc serve "
    },
    
  • Start project in dev mode

    pnpm serve
    

    Terminal output:

    App running at:
    - Local:   http://localhost:8080/
    - Network: http://192.168.2.6:8080/
    
  • In another terminal, run plaoc:serve command

    pnpm plaoc:serve http://192.168.2.6:8080/
    

    Terminal output:

    metadata:       http://127.0.0.1:8096/metadata.json
    metadata:       http://192.168.2.6:8096/metadata.json
    metadata:       http://198.18.0.1:8096/metadata.json
    
  • Run developer tool app with command:

    For macbook m1 example:

    open /Users/xxxpath/dweb-browser-devtools.app --args -- --start install --url http://192.168.2.6:8096/metadata.json
    
  • Can now download and debug plaoc-app project in developer tool app

  • Package plaoc-app when development complete

  • Publish

Key Steps Explanation

@plaoc/cli

Developer tool

Release

Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v2.13.0