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

skeleton-weex-plugin

v1.0.1

Published

a plugin of skeleton-webpack-plugin for generate weex skeleton

Readme

skeleton-weex-plugin

skeleton-weex-plugin是skeleton-webpack-plugin的一个插件,它主要用于生成weex端的骨架屏代码

如何使用

skeleton-weex-plugin必须结合skeleton-webpack-plugin一起使用.
在使用之前你必须先安装它们。

npm i skeleton-webpack-plugin skeleton-weex-plugin --save-dev

或者

yarn add skeleton-webpack-plugin skeleton-weex-plugin --dev

在安装好该webpack插件之后,你只需要在其plugins配置项中添加上skeleton-weex-plugin即可。

const SkeletonWebpackPlugin = require('skeleton-webpack-plugin')
cosnt HtmlWebpackPlugin = require('html-webpack-plugin')
const SkeletonWeexPlugin = require('skeleton-weex-plugin')
module.exports = {
  entry: 'index.js',
  mode: 'development',
  output: {
    path: 'dist',
    filename: 'index.bundle.js'
  },
  plugins: [
    new SkeletonWebpackPlugin({
      outDir: __dirname,
      projectDir: __dirname,
      plugins: [SkeletonWeexPlugin]
    }),
    new HtmlWebpackPlugin({
      filename: 'index.html',
      inject: true
    })
  ]
}

然后当你启动dev server本地预览页面时,打开你的控制台,输入skeleton并按下回车键即可

skeleton-weex-plugin将会在你对应的页面目录下生成skeleton.vue的文件:

<template>
<div v-if="isShow" class="skeleton-wrapper">
<div>skeleton content</div>
</div>
</template>
<script>
export default {
  name: "Skeleton",
  props: {
    isShow: {
      type: Boolean,
      default: false
    }
  }
}
</script>
<style scoped>
skeleton style content
</style>

怎样你就可以将骨架屏当初一个组件来使用,并控制它的隐藏和显示

它是如何实现的

作为skeleton-webpack-plugin的插件,skeleton-weex-plugin可以获取到骨架屏html与css的抽象语法树,skeleton-weex-plugin只需要将语法树转化成weex代码。这里我选择了vue作为weex的dsl。