a full mini app architecture
-
android a project for user terminals, provides Javascript runtime
-
framework a lower-layer framework for mini apps
-
pack a tool for packing user mini-app project and framework
-
mini an example of mini-app
-
cli 🔥mini-architecture cli
-
devtools 🔥 a tool for developing, like weixin devtools
-
utils ma project utils
-
yarn global add @mini-architecture/cli
-
ma-cli pack -e @mini -w
before you run, don't forget to connect mobile to you computer. It may be slow for the first time while you running
find more at @mini-architecture/cli
// index.html
<view>
<button bindtap="bindEvent" class="btn">click me</button>
<view class="{{bindCls}}">bind-data: {{hello}}</view>
<button bindtap="goNext">go next page</button>
</view>
// index.js
Page({
data: {
hello: 'hello world',
bindCls: 'view',
},
bindEvent() {
this.setData({ hello: 'hello again' })
},
goNext() {
ma.navigateTo({
url: 'pages/demo/index',
success() {},
})
},
})
find more at @mini-architecture/framework
- clone
git clone git@github.com:lawler61/mini-architecture.git && cd mini-architecture
- install dependences
yarn
do not use lerna bootstrap
cause the dependences are managed by yarn workspace
- develop
-
pack:
yarn dev:pack
-
devtools client:
yarn dev:dt:client
-
devtools launcher:
yarn dev:dt:launch
-
cli:
yarn dev:cli
- add dependence
-
for workspace:
yarn add <dependence> -D -W
-
for a package:
yarn lerna add <dependence> --scope <package>
install form built apk
-
OS: Mac
-
Mobile: 小米10(android 10)
mini-architecture:从零手撸一整套小程序架构
-
build logs
-
package publish 改造
-
package dev & cli 调用
-
cli
-
devtools
-
custom devtools front end
-
other page api in android
-
worker service in devtools
-
maybe custom components
-
v8 thread worker
-
v8 thread debug tool with Android
-
all view page build in one html