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

hmuniapptemplate

v1.0.0

Published

> 官网:[https://haomo-tech.com](https://haomo-tech.com)

Downloads

1

Readme

毫末uni-app框架

官网:https://haomo-tech.com

作者:胡小根

邮箱:[email protected]

安装

node版本:建议 12.13.1

npm install -g cnpm
npm install -g cross-env
cnpm install

# 配置HBuilderX的sass
mkdir -p /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-72
cd /Applications/HBuilderX.app/Contents/HBuilderX/plugins/compile-node-sass/node_modules/node-sass-china/vendor/darwin-x64-72
wget https://github.com/sass/node-sass/releases/download/v4.13.1/darwin-x64-72_binding.node -O binding.node

开发

请使用HBuilderX进行开发。编写代码,可以考虑同时使用Visual Studio Code

组件开发

  • 1.在components/hm-components编写组件。只有有接口数据交互的复杂组件才需要在这里面写组件。

  • 2.在templates/下面编写组件模板。模板的语法见:http://handlebarsjs.com/

  • 3.在configs/uni-ui.js中注册组件

  • 4.在xmind中引用组件。请按照以下步骤安装xmindparser。xmindparser可以将xmind转换为json文件。json文件需保存为 configs/xmind.json。

# 请将以下所有命令,一起拷贝到terminal下执行。
pip3 install xmindparser
sudo cat > /usr/local/bin/xmindparser <<EOF
#!/usr/local/bin/python3

# -*- coding: utf-8 -*-
import re
import sys

from xmindparser.main import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())
EOF
sudo chmod a+x /usr/local/bin/xmindparser
export PATH=$PATH:/usr/local/bin

使用xmind2code生成代码

特别注意:以下 <module> 指的是模块名称,要替换成对应的模块名称!

  • 1.创建xmind文件。在configs/目录中创建xmind文件,文件命名规则为:<module>.xmind。特别注意:xmind文件中的主题,必须为模块名称(如下图中红色箭头指示的module)

  • 2.创建xmind2code/.xmind2code.<module>.json文件
{
  "xmind": "./configs/<module>.xmind",
  "uiConfig": "./configs/uni-ui.js",
  "templateDir": "./templates",
  "routeFile": "./pages.json",
  "output": "./pages"
}
  • 3.生成代码
# 以下命令中的 <module> 请替换为自己的xmind文件的模块名称。
# 特别注意:xmind文件命名,尽量
npm run gen <module> # 生成所有代码(包括vue/js/css)

# 删除生成vue代码
npm run clean <module>

布局

采用Flex布局:http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html

组件间通信

采用:https://uniapp.dcloud.io/collocation/frame/communication

eventName命名规范:.。这里的id为组件的id,eventName为组件支持的事件响应。

例如:

f6ff37c70518d2565de4d0c09a683aaf.on-refresh

参考

  • http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html