wn-lottery

0.0.1-development • Public • Published

lottery

Rollup badge Jest Vue Storybook Commitizen semantic-release Npm badge Build Status

抽奖程序

Generated using vue-cli-template-library.

Installation

npm install lottery

lottery can be used as a module in both CommonJS and ES modular environments.

When in non-modular environment, lottery will register all the components to vue by itself.

ES6

//
// You can register a component manually
//
import { HelloWorld } from 'lottery';
 
export default {
  ...
  components: {
    HelloWorld
  },
  ...
};
 
//
// or register the whole module with vue
//
import ModuleLibrary from 'lottery';
 
// Install this library
Vue.use(ModuleLibrary);

CommonJS

//
// You can register a component manually
//
var Vue = require('vue');
var ModuleLibrary = require('lottery');
 
var YourComponent = Vue.extend({
  ...
  components: {
    'hello-world': ModuleLibrary.HelloWorld
  },
  ...
});
 
//
// or register the whole module with vue
//
var Vue = require('vue');
var ModuleLibrary = require('lottery');
 
// Install this library
Vue.use(ModuleLibrary);

Browser

<script src="path/to/vue/vue.min.js"></script>
<script src="path/to/lottery/dist/lottery.min.js"></script>
<!-- Components are registered globally -->

After that, you can use it in your templates:

<hello-world></hello-world>

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Package Sidebar

Install

npm i wn-lottery

Weekly Downloads

4

Version

0.0.1-development

License

MIT

Unpacked Size

283 kB

Total Files

17

Last publish

Collaborators

  • weineel