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

@starxqqqq/h5-package

v1.5.2-1

Published

h5离线打包工具

Downloads

1

Readme

h5-package

h5-package是一个从mpackage-cli基础上扩展的hybrid app H5离线资源包的打包工具。

可以生成离线资源包和离线资源的清单文件。

h5-package需要从项目配置文件package.json读取以下属性,这些属性在上传到服务器解析时需要

name 项目英文名称,因要作为目录使用,不要用特殊字符
title 项目中文名称
version 构建版本
versionCode 构建版本号,纯数字
entryFile 项目入口文件,一般为html文件路径
description 项目描述
host h5服务器选择列表
inject 打包时注入html的js或css文件

安装/卸载

全局安装/卸载
yarn global add http://gitlab.hztianque.com/tq-appcloud-dev/web/h5-package.git
yarn global remove h5-package
本地安装/卸载
yarn add http://gitlab.hztianque.com/tq-appcloud-dev/web/h5-package.git -D
yarn remove h5-package

全局安装用法

# 帮助
h5-package -h
# 查看版本
h5-package --version
# 打包
h5-package build <src>
# 指定打包存放目录,默认package
h5-package build <src> --dist|-d [dist]
# 打包时注入tq-h5container.min.js
h5-package build <src> --tqh5container|-t [tqh5container]

本地安装用法

# 帮助
node node_modules/h5-package -h
# 查看版本
node node_modules/h5-package --version
# 打包
node h5-package build <src>
# 指定打包存放目录,默认package
node h5-package build <src> --dist|-d [dist]
# 打包时注入tq-h5container.min.js
node h5-package build <src> --tqh5container|-t [tqh5container]

package.json 格式示例

{
  "name": "collection",
  "title": "全科采集",
  "version": "1.0.91",
  "versionCode": "1091",
  "entryFile": "h5/index.html",
  "description": "A Vue.js project",
  "host":{
    "hz": "172.17.229.227:21100",
    "wz": "192.168.1.148:21100",
    "tz": "192.168.1.178:21400",
    "jx": "59.202.29.209:21100",
    "jd": "182.140.240.104:21100"
  },
  "inject":{
    "js":["aa.js"],
    "css":["aa.css"]
  },
  ...
}

pkg.json 格式示例

{
	"protocol": ["http", "https"],
	"package": "collection",
	"title": "全科采集",
	"version": "1.0.104",
	"versionCode": "10104",
	"entryFile": "h5/index.html",
	"description": "A Vue.js project",
	"host": "182.140.240.104:21100",
	"rules": [{
		"path": "/collection/h5/index.html",
		"file": "collection/h5/index.html"
	}, {
		"path": "/collection/h5/static/assets/banner.6550a83.png",
		"file": "collection/h5/static/assets/banner.6550a83.png"
	}, {
		"path": "/collection/h5/static/assets/bg_org.25b12fb.png",
		"file": "collection/h5/static/assets/bg_org.25b12fb.png"
	}, {
		"path": "/collection/h5/static/map/manifest.json",
		"file": "collection/h5/static/map/manifest.json"
	}, {
		"path": "/collection/h5/static/map/map.html",
		"file": "collection/h5/static/map/map.html"
	}, {
		"path": "/collection/tq-h5container.min.js",
		"file": "collection/tq-h5container.min.js"
	}]
}