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

lighting-plugin-native

v2.0.18

Published

> lighting-plugin-native 用于采用配置化的方式开发 APP 程序,读取工程根目录下的 /native/config.js 中的配置,生成 LightApp 的资源包。

Downloads

20

Readme

lighting-plugin-native 用于采用配置化的方式开发 APP 程序,读取工程根目录下的 /native/config.js 中的配置,生成 LightApp 的资源包。

使用

在工程根目录下的 project.json 中的 plugins 字段中注册 native 插件:

{
    "project":"lightdemo",
    "version":"0.0.1",
    "desc":"lightdemo",
    "type":"vue",
    "plugins":["native"]
}

在 /native/config.js 中配置(点击查看更多配置):

module.exports = {
    menuBar:{
        backgroundColor:"#ffffff",//背景色
        defaultColor:"#ffffff",//默认菜单颜色
        selectedColor:"#0078ff",//菜单选中颜色

        //使用字体图标自动生成图片,省去了开发者自己制作多张图的问题
        iconFontFrom:"/native/iconfont.ttf",

        menus:[{
            text:'首页',//菜单的文本
            icon:'0xe605',//菜单图标在字体中的码点可以查看对应的css文件了解具体的码点,具体格式为0xabcd
            view:"home",//当前菜单对应的视图名称,视图必须在views属性中定义
        }],
        views:{
            "home":{
                url:"app.native.js#/home",
                navBar:{
                    type:"0"
                }
            }
        }
    }
};

第一步:创建做包工程

使用指令 light create -t app 创建做包工程。

第二步:编辑菜单及配置文件

编辑 native 目录下的资源文件,如 native/config.js 定义整包配置项目。

第三步:打包及上传

使用 light release -p 指令做打包操作,将生成的 zip 包上传到平台对应应用的条目内。

第四步:在平台集成出安装包

使用平台的在线构建编译能力输出可安装的安装包。

文档

了解更多 lighting-plugin-native 插件的信息,请点击这里

更新记录

v2.0.16

  1. 支持在native/appbaseres目录下配置ExtraConfigiOS/ExtraConfigAndroid

v2.0.13

  1. 支持2.0小程序APP化,tab、标题栏等信息在app.json配置

v1.0.91

  1. #142433 light native插件当配置的菜单地址是http协议但是不是https内容,打包警告用户使用https协议的地址以保障通信安全
  2. #141509 native插件要对侧边栏组件的gmu文件进行封装,原生侧边栏的完整配置
  3. #141475 native插件处理1024*1024图标时不需要用户主动配置,只需要使用imagemagick 生成一张不带透明度的图片即可

v1.0.90

  1. #142813 菜单栏支持开启异型按钮

v1.0.86

  1. #126813 离线包优化-集成离线包可选

2018.01.03

  1. 增加1024图片的处理
  2. 修正iphonex的图片错误

2018.01.04

  1. windows下裁剪图片的功能实现
  2. 增加图片裁剪的功能调整
  3. icon图片按倍率打包
  4. 图片缩放不按照等比例缩放

2018.04.20

  1. 生成的gmu文件自动格式化