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 🙏

© 2026 – Pkg Stats / Ryan Hefner

maxilo-vue

v3.0.7-beta14

Published

maxilo web framework.

Readme

maxilo-vue

文档

例子

https://github.com/maxiloEmmmm/maxilo-vue/tree/master/example/quickstart

路由

    import maxiloVue from "maxilo-vue"

    let router = maxiloVue.make("router").getRoute()

    // 添加路由 /path
    router.add("path", "componment")

    // 添加嵌套路由 /path
    router.group("path", "component", (r) => {
        // 需要使用入参而不是外部router
        // /path/path
        r.add("path", "component"),
        // /path/path1
        r.add("path1", "component"),
        // /path/path2
        r.group("path2", (rr) => {
            return [
                // /path/path2/path
                rr.add("path", "component"),
                // /path/path2/path1
                rr.add("path1", "component"),
            ]
        })
    })

    // 添加中间件
    router.add("path", "componment").addMiddleware("middleware1")
    router.middleware("middleware1").add("path", "componment")
    
    // 添加中间件组
    router.middlewareGroup(["middleware1"], () => {
        return [
            router.add(),
            router.group(),
            ...
        ]
    })

DI

import maxiloVue from "maxilo-vue"
maxiloVue.register({
    register(app){
        app.bind("x", function(app, args){
            //return instance
            return args
        })
    },
    boot: function(app){
        // 启动部分 如果需要初始化就放这
        console.log("x boot")
    }
})

// maxiloVue.make || this.$app.make
// 单例
console.log(maxiloVue.make("x", [1,2,3]))

maxiloVue.register({
    register(app){
        app.bind("r", function(app){
            //return instance
            return Math.random()
        })
    },
    boot: function(app){
        // 启动部分
        console.log("r boot")
    }
})
// maxiloVue.one || this.$app.one
// 非单例
console.log(maxiloVue.one("r"))

// 默认加载
// config http i18n store utils validator vue
// https://github.com/maxiloEmmmm/maxilo-vue/tree/master/core/*ServiceProvider.js

store

const state = {
    server: ""
}

const mutations = {
    setCurrentServer(state, payload){
        state.server = payload
    }
}

import maxiloVue from "maxilo-vue"
// 自动存储和读取localstorage
maxiloVue.make("store").add('server', {
    state,
    mutations,
    namespaced: true,
})

this.$store.commit("server/setCurrentServer", key)

// 一次性 刷新数据消失
maxiloVue.make("store").once('server', {
    state,
    mutations,
    namespaced: true,
})

utils

utils.add("x", () => {
    console.log("x")
})
this.$utils.x()

utils.add("q.p", () => {
    console.log("q.p")
})
this.$utils.q.p()

// 绑定this
utils.add("b", function() {
    console.log(this.app.make("x", [1,2,3]))
}, true)
this.$utils.b()

validate

import maxiloVue from "maxilo-vue"
const validator = maxiloVue.make("validator")
import { required } from 'vee-validate/dist/rules';

maxiloVue.register({
    // 在注册阶段注册 boot阶段无效
    register: function(app){
        validator.addRule('configOk', {
            validate: async config => {
                try {
                    await app.make("http").post("/validate/config", {payload: {config}})
                    return true
                } catch (error) {
                    return error
                }
            },
            message: "compose配置有误"
        })
        validator.addRule("required", {
            ...required,
            message: "必填不可为空!"
        })
        
        validator.addRule("abc", {
            validate(value){
                return /^[a-zA-Z0-9-_]+$/.test(value)
            },
            message: "只可以为大小写字母数字和-_"
        })
    }
})

config

// 添加 | 覆盖
config.add("baseURL", process.env.VUE_APP_BASEURL ? process.env.VUE_APP_BASEURL : "http://localhost:8000")
console.log(this.$configs.baseURL)

//baseURL 用于axios
//debug 调试模式
//locale 语种
//storeKey store存储localstorage key