Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vux

Package Overview
Dependencies
Maintainers
1
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vux

Mobile web UI based on Vue and Weui

  • 0.0.103
  • dev
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
389
decreased by-8.9%
Maintainers
1
Weekly downloads
 
Created
Source

VUX = Vue + Weui + Components

Demo

https://vux.li

Usage by importing UMD modules

# install vue-cli
npm install -g vue-cli

# init a webpack project
vue init webpack my-project
cd my-project
npm install
npm install vux@dev
npm run dev
<template>
  <div>
    <group>
      <cell title="vue" value="cool"></cell>
    </group>
  </div>
</template>

<script>
import { Group, Cell } from 'vux'

// or you can import the components you need
// by this way, you can reduce webpack bundle size
import Group from 'vux/components/group/'
import Cell from 'vux/components/cell/'

export default {
  components: {
    Group,
    Cell
  }
}
</script>

<style>
@import '~vux/vux.css';
</style>

Usage by importing .vue file

add a js loader in webpack.base.conf.js

{
  test: /vux.src.*?js$/,
  loader: 'babel'
}

import the components you need

import Group from 'vux/src/components/group'
import Cell from 'vux/src/components/cell'

you can use a shorter path by adding resolve.alias in webpack.base.conf.js

resolve: {
  alias: {
    'vux-components': 'vux/src/components/'
  }
}

now you can import like this:

import Group from 'vux-components/group'
import Cell from 'vux-components/cell'

Usage by including scripts

checkout examples/scripts.html

<!--include Vux style-->
<link rel="stylesheet" href="vux/vux.css">
<!--include Vue yourself-->
<script src="vue.js"></script>

<div id="demo">
  <group>
    <cell title="vue" value="cool"></cell>
  </group>
</div>

<!--include the components you need-->
<script src="vux/components/group/index.js"></script>
<script src="vux/components/cell/index.js"></script>

<script>
// register components
Vue.component('group', vuxGroup)
Vue.component('cell', vuxCell)

new Vue({
  el: '#demo'
})
</script>

Remove click delays

const FastClick = require('fastclick')
FastClick.attach(document.body)

Async loading Components

// import Countup from './demos/Countup'

const Countup = function (resolve) {
  require(['./demos/Countup'], resolve) // webpack will do the rest things
}

Work in Progress

This project is still in progress, so do not rely on this for anything important before production-ready version released. And pull requests are welcome.

Development Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build components before publishing
npm run xbuild

# publish and deploy to gh-pages
npm run xpublish

# run unit tests
npm test

For detailed explanation on how things work, consult the docs for vue-loader.

Components

Liscence

MIT

FAQs

Package last updated on 24 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc