npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

weex-eros-template

v1.0.1

Published

本木前端 weex 集成方案

Downloads

6

Readme

weex-eros

目前仅支 MAC 开发

首次安装

首先下载 本木前端脚手架 BMFE_scaffold

    sudo cnpm install BMFE_scaffold -g
  • ios:

    • appStore 中搜索 Xcode 并下载。
  • android:

生成目录

1. 通过脚手架自动生成weex-eros目录。

    sudo BM init -f weex-eros-template

依次填写:

  • 项目名称;
  • 初始版本号;
  • 文件生成方式选择:
    • 2 ( weex-eros )

2. cd 进入到前端开发目录 fe 下

    cd 上面填写的项目名称/fe/

3. 通过 init 来选择更新和加载相应平台的依赖,目前仅支持 ios,有且仅当 ios/WeexEros/Benmu-iOS-Library 本木依赖本版本更新的时候,您可以选择性的执行下面指令来更新,首次启动必须执行。

    bm eros init ios

当执行完此指令后,如果您已经安装完 Xcode ,自动会为你打开,这时候您在点击左上方选择对应 iphone 模拟器,点击 build 箭头按钮便开始编译和打包您的 app

首次打开我们已经为您内置了由一些 weex 的官方 demo 和我们二次封装的一些组件 demo 打包而成的内置包。所以您可以看到相关的页面,下面我们来说下开发时候的步骤。

开发阶段

开始本地调试

首先配置 fe 目录下的 platform.json 文件。

// platform.json
{
    // app 名称
    "appName": "WeexEros",
    // 页面相关
    "page": {
        "homePage": "/pages/home/index.js",                     // 首页 js 相对路径
        "mediatorPage": "/service/bus/index.js",                // 中介者页面相对路径 一般可不做修改
        "navBarColor": "#3385ff"                                // 首页导航条颜色
        // 注意: 首页导航的显示隐藏需要手动调用拓展出来的 $nav 来进行设置
        // bmRouter: {
        //    viewWillAppear() {
        //         this.$nav.setNavigationInfo({
        //              hideNavbar: true
        //              ... 
        //         }, () => {
        //              // 设置成功回调
        //        })
        //    }
        // }

    },
    // 路径相关
    "url": {
        // 默认请求域名
        "request": "http://test4.benmu-health.com",
        // 默认本地服务路径
        "local": "http://fe.benmu-health.com",
        // 默认图片上传路径 绝对路径
        "image": "https://lev-inf.benmu-health.com",
        // 检测 js 更新接口,相对路径,会自动拼接上面的 request        
        "checkJsVersionApi": "/mobile/app/version/checkJSUpdate"
    },
    // 个推相关
    "getui": {
        "enabled": "ture",
        "appId": "oqoYepdVOmAls6b36biSV2",
        "appKey": "DB8n1tT8XpAgzjMfMyBGvA",
        "appSecret": "epeqetV7Q46zWoZkdaWZE9"
    },
    // 友盟统计和分享相关
    "umeng": {
        "enabled": "ture",
        "iOSAppKey": "59264dee04e205bbe200182e",
        "androidAppKey": "value"
    },
    // 微信支付相关
    "wechat": {
        "enabled": "false",
        "appId": "",
        "appSecret": ""
    },
    // 高德地图相关
    "amap": {
        "enabled": "false",
        "appKey": ""
    }
}

如果您已经下载了类似 Charles 的抓包工具,直接看步骤二。

  1. 下载安装 MacCharles ,并破解(下载和破解地址),然后开启 Charles
  2. 本地配置资源文件名 hosts
    127.0.0.1       fe.benmu-health.com 

默认是 fe.benmu-health.com ,如果需要更改,请对应更改 platform.json 中的 url.local

  1. platform.json, zip 包等信息传入 /fe/config.js 中配置的对应平台的地址
    // fe/config.js
    {
        ...
        'iosZipFolder': '/ios/WeexEros/WeexEros', // ios 文件存放地址
        'androidZipFolder': '/android/WeexFrameworkWrapper/app/src/main/assets', // android 文件存放地址
        ...
    }

fe 目录下 命令行中执行如下指令

    sudo bm eros min
  1. 通过脚手架起本地服务
    sudo bm server