socomodule
v1.2.0
Published
Soco integration
Downloads
79
Maintainers
Readme
SoCoModule is a pluggable JavaScript script that can be used without any configuration on any web page.
Install socomodule (ES6 Modules / CommonJS)
With npm:
npm install --save-dev socomodule
With yarn:
yarn add -D socomodule
Install socomodule (UMD)
Download the UMD module:
Check out the latest GitHub releases. Download and extract the latest socomodule-umd.zip.
Or just use the unpkg CDN, for exemple: https://unpkg.com/socomodule/umd/socomodule.min.js https://unpkg.com/socomodule/umd/socomodule.min.css
Use in a Vue.js app
<template>
<div>
...
<socomodule></socomodule>
...
</div>
</template>
<script>
import Vue from 'vue'
import socomodule from 'socomodule'
import 'socomodule/socomodule.min.css'
Vue.component('socomodule', socomodule.default)
export default {
name: 'my-component'
}
</script>
Use in any web application
Exemple in CodePen
<head>
<script src="socomodule.min.js" charset="utf-8"></script>
<script src="https://unpkg.com/vue" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="socomodule.min.css">
</head>
<body>
<!-- ... your application -->
<div id="app">
<socomodule></socomodule>
</div>
<script>
var sc = Vue.component('socomodule', window.Socomodule.default);
var app = new Vue({el: '#app'})
</script>
</body>