@railken/quartz-core
v2.0.2
Published
A Vue.js 2.0 library project
Downloads
2
Readme
@railken/quartz-core
A Vue.js 2.0 library project
Generated using vue-cli-template-library.
Installation
npm install @railken/quartz-core
@railken/quartz-core can be used as a module in both CommonJS and ES modular environments.
When in non-modular environment, @railken/quartz-core will register all the components to vue by itself.
ES6
//
// You can register a component manually
//
import { HelloWorld } from '@railken/quartz-core';
export default {
...
components: {
HelloWorld
},
...
};
//
// or register the whole module with vue
//
import ModuleLibrary from '@railken/quartz-core';
// Install this library
Vue.use(ModuleLibrary);
CommonJS
//
// You can register a component manually
//
var Vue = require('vue');
var ModuleLibrary = require('@railken/quartz-core');
var YourComponent = Vue.extend({
...
components: {
'hello-world': ModuleLibrary.HelloWorld
},
...
});
//
// or register the whole module with vue
//
var Vue = require('vue');
var ModuleLibrary = require('@railken/quartz-core');
// Install this library
Vue.use(ModuleLibrary);
Browser
<script src="path/to/vue/vue.min.js"></script>
<script src="path/to/@railken/quartz-core/dist/@railken/quartz-core.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.