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

@smartblog/models

v1.2.9

Published

- [npm](#npm) - [smartBlog 前后端接口](#smartBlog前后端接口) - [article](#article) - [tag](#tag) - [menu](#menu)

Downloads

6

Readme

smartBlog models

npm

  • npm login (只需要登录一次)
  1. 登录的时候需要使用源地址: npm login --registry http://registry.npmjs.org 否则会提示 409
  • version
  1. npm version patch (上升一个小版本:0.0.1 -> 0.0.2)
  1. 可以直接修改 package.json 中的 version 不需要使用 npm version patch
  • publish

首次发布之前需要注意 package.json 的包名,不能使用的名字,vscode 会标黄,强行 publish 会提示 400 ; 发布之前需要提交或清除git工作区的内容,并且每次发布都要修改 version

  1. npm publish (发布正式版本)

  2. npm publish --tag beta (发布测试版本)

  3. npm publish --tag beta --access=public (发布测试版本)

  4. npm publish --access=public (发布正式版本)

创建了组织,没有付费就要设置 --access=public 才能发布

https://docs.npmjs.com/cli/publish

  • tag

https://docs.npmjs.com/cli/dist-tag

smartBlog前后端接口

article

/**
 * @interface 文章接口
 * @property title 文章标题
 * @property post 文章封面
 * @property content 文章内容
 * @property html 文章内容html
 * @property tag 文章标签
 * @property createTime 文章创建时间 YYYY-MM-DD HH:mm:ss
 * @property updateTime 文章更新时间 YYYY-MM-DD HH:mm:ss
 * @property version 版本
 * @property history 修改历史
 */
export interface IArticle extends IBase {
    title: string
    post: string
    content: string
    html: string
    tag: string[]
    createTime: string
    updateTime: string
    version: number
    history: IArticle[]
}

tag

/**
 * @interface 标签
 * @property text 标签名字
 * @property value 标签key
 * @property createTime 文章创建时间 YYYY-MM-DD HH:mm:ss
 * @property updateTime 文章更新时间 YYYY-MM-DD HH:mm:ss
 * @property version 版本
 * @property history 修改历史
 */
export interface ITag extends IBase {
    text: string
    value: string
    createTime: string
    updateTime: string
    version: number
    history: ITag[]
}

menu

/**
 * @interface 菜单
 * @property icon 菜单小图标
 * @property title 菜单名字
 * @property path 菜单路由
 * @property children 子菜单
 * @property version 版本 
 */
export interface IMenu {
    icon?: string
    title: string
    path: string
    children?: IMenu[]
    disabled?: boolean
    version?: number
}