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

layuicdns

v1.4.9

Published

LayuiCdn ABXCdn

Downloads

192

Readme

依托架构

LayuiCdn 基于 LayuiCdnPro[Cdn] + 腾讯云 [API网关 + SCF无服务器云函数 + DSA动态网络加速 + COS对象储存] 等,全局托管实现全年不休的云上计算业务,全程无需人为干预即可提供自动运行等计算能力,进行实时监控,并24小时内更新到LayuiCdn API

1-基础用法

  1. 通常我们使用Layui需要在面页下载并加载Layui目录下文件如下
<link type="text/css" href="./layui/css/layui.css" />
<script src="./layui/layui.js"></script>

layui/
  ├─css
  │  └─layui.css   # 核心样式库
  └─layui.js       # 核心模块库
  1. 使用LayuiCdn后我们将无需打包下载加载任何文件!只需要在面页写下两行代码:
<link type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
<script src="https://www.layuicdn.com/layui/layui.js"></script>

基础示例:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.8.0/css/layui.css" />
  </head>
  <body>
    <script src="https://www.layuicdn.com/layui-v2.8.0/layui.js"></script>
    <!--您的Layui代码start-->
    <script type="text/javascript">
      layui.use(function(){
        var layer = layui.layer; //弹层 示例...

        // 弹出一个示例
        layer.msg('Hello World', {icon: 6});

      });
    </script>
  </body>
</html>

最简写法: 自动最新版

<link type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
<script src="https://www.layuicdn.com/layui/layui.js"></script>

建议写法: 强制版本版

<link type="text/css" href="https://www.layuicdn.com/layui-v2.8.0/css/layui.css" />
<script src="https://www.layuicdn.com/layui-v2.8.0/layui.js"></script>

2-高级用法

  1. 当我们感觉上述方法使用LayuiCdn还是很臃肿,那么您可以尝试以下写法
<script src="https://www.layuicdn.com/auto/layui.js" v="layui"></script>
  1. 将自动实现 基础用法 的全部逻辑加载!务必将代码写在面页头部的head标签内
<head>
  <script src="https://www.layuicdn.com/auto/layui.js"></script>
</head>
  1. 标签内v参数为版本, 如v="2.8.0" 即自动引入2.8.0版本的layui, 如值为 layui 或 不携带v参数 则默认为最新版本的layui 例:
<script src="https://www.layuicdn.com/auto/layui.js" v="2.8.0"></script> 
  1. e参数为模块, 如e="layui" 或 e="layui.all" 即自动引入 layui 或 layui.all 的js模块, 如不携带e参数则默认为layui 例:

注:此模块仅支持2.6.0以下版本

<script src="https://www.layuicdn.com/auto/layui.js" e="layui.all"></script>

最简写法: 自动最新版

<script src="https://www.layuicdn.com/auto/layui.js"></script>

建议写法: 强制版本 解析为2.8.0版本

<script src="https://www.layuicdn.com/auto/layui.js" v="2.8.0"></script>

高级示例:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <script src="https://www.layuicdn.com/auto/layui.js" v="2.8.0"></script>
  </head>
  <body>
    <!--您的Layui代码start-->
    <script type="text/javascript">
      layui.use(function(){
        var layer = layui.layer; //弹层 示例...

        // 弹出一个示例
        layer.msg('Hello World', {icon: 6});

      });
    </script>
  </body>
</html>  

相关

官网 API 文档