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

asf-navbar

v1.0.0

Published

asf网站导航栏

Downloads

27

Readme

asf-navbar

使用

通过包管理器安装:

# Installation with npm
npm install asf-navbar -D
# or with yarn
yarn add asf-navbar -D

React Demo

import { ReactNavBar } from 'asf-navbar';

export default () => {
  return (
    <div>
      <ReactNavBar/>
    </div>
  )
}

Vue Demo

<template>
  <div class="parent-element">
    <vue-nav-bar :config="conf" :proj="'实用工具'" :activate-call-back="callback" ></vue-nav-bar>
  </div>
</template>
<script>
import { VueNavBar } from './node_modules/asf-navbar';
  export default {
    components:{
        VueNavBar
    },
    data() {
      return {
        conf: {
          elementaryBar: "实用工具",
          secondaryBars: [
            {name: "枝网查重", link: "https://www.baidu.com"},
            {name: "成分姬", link: "https://www.baidu.com"},
            {name: "表情包", link: "https://www.baidu.com"},
            {name: "方言词典", link: "https://www.baidu.com"},
          ]
        }
      }
    },
    methods:{
        callback(str){
            window.open(str);
            console.log(str);
        }
    }
  }
</script>

开发

# 运行前安装
yarn install

# 调试
yarn serve:vue    # 查看 vue 组件
yarn serve:react  # 查看 react 组件

# 打包
yarn build        # 构建项目

# 代码检测
yarn lint

# 发布至 npm
yarn release:publish

API

| 参数 | 说明 | 类型 | 默认值 | | ---- | ---- | ---- | ---- | |config| 导航栏设置 | Object| - | | proj | 项目名 | String| - | | activate-call-back | 子菜单点击后触发的回调函数 | Function| function openInNewTab(str){window.open(str)} |

项目地址

https://gitee.com/asoul-fan/asf-navbar-vue

环境

Commit时备注

  • 增加从未有过的功能,即新增功能性提交:<feat>: +提交说明
  • 不改变功能,即新增非功能性提交: <refactor>: +提交说明
  • 优化之前的代码,即更新功能性提交: <update>: +提交说明
  • 提交说明可以使用中文

分支规范

多分支开发遵从 GITFLOW 规范

GIT提交规范

  • 提交前会自动启动 Git Hook 调用 husky + yarn lint,若检测到有任何语法错误或 typo 会阻止提交。

  • 为避免全局配置中的邮箱或姓名带有盒信息,请修改全局 Git 配置或在具体项目根目录下使用以下命令修改 Git 提交信息

    git config user.name "xxxx"
    git config user.email "[email protected]"

代码规范

  • 变量命名优先遵循eslint+babel自带规范,若无提示,默认使用驼峰命名法(camelCase)
  • 请不要随意格式化他人的文件
  • 在引入非官方依赖前需要联系负责人确认
  • 新人提交的代码需要进行code review