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

weex-vue-bundle-util

v0.1.7

Published

bundle tool for weex-vue-render.

Downloads

15

Readme

weex-vue-bundle-util

This tool is for weex-vue-render to bundle the components and modules which you have used in your projects. You can just use the export function to analyse the used built-in components and modules, which returns a promise with a object includes components and modules fields. You just packing up them with the render-core (weex-vue-render/dist/index.core.js) in your project's entry file. By doing this you can pack up your render in the minimum size without all the irrelative codes of components and mdoules you haven't used in your project.

how to use

just use the module as a function, pass in the webpack config and webpack it self, and run it before your compiling process. The function returns a promise:

const webpack = require('webpack')
const config = require('your-projects-webpack-config.js')
const scan = require('weex-vue-bundle-util')
scan(webpack, config)
  .then(function (res) {
    const { components, modules } = res
    packYourProjectWith(components, modules)
    // if you are using @ali/weex-vue-render, please pass a options with 'ali' set like the codes below.
    // scan(webpack, config, { ali: true })
  })

OPTIONS

  • ali: Boolean. Optional. False by Default. If you use @ali/weex-vue-render, please add this and set to true.

  • output: String. Optional. If you want to generate a import entry file for the plugins, just set a output path for this file. You should use a absolute path. The generated file is like this:

    import a from 'weex-vue-a'
    import animation from 'weex-vue-animation'
    export default [
      a,
      animation
    ]
  • allowInstallPlugins: Boolean. Optional. False by default. If true, the dependend plugins will be auto installled, and only this be true the peerDependencies of the plugins could be analyzed and output to the result object.

  • allowInstallPluginDependencies: Boolean. Optional. False by default. If true, the peerDependencies of the plugins (e.g: '@ali/lib-windvane' for 'windvane' API module) will be auto installed and be imported in the plugin entry file.

NOTES

This tool can only get the components used in the template which should be able to be processed in vue-loader. The components you use in render function will be ignored.

components and modules

Here is a list about components and modules you can pack into your project. The aliweex only built packages list should be found in gitlab repo of @ali/weex-vue-render.

components

| npm module name | component name | | --- | --- | | weex-vue-a | a | | weex-vue-input | input | | weex-vue-slider | slider / slider-neighbor | | weex-vue-switch | switch | | weex-vue-textarea | textarea | | weex-vue-video | video | | weex-vue-web | web |

modules

| npm module name | API module name | | --- | --- | | weex-vue-animation | animation | | weex-vue-clipboard | clipboard | | weex-vue-dom | dom | | weex-vue-event | event | | weex-vue-geolocation | geolocation | | weex-vue-global-event | globalEvent | | weex-vue-modal | modal | | weex-vue-nav | navigator | | weex-vue-storage | storage | | weex-vue-stream | stream | | weex-vue-websocket | websocket | | weex-vue-webview | webview |

Enjoy happy building!