# Setup
WARNING
You must have access to the Github Packge Registory owned by the ABEJA organization and a Personal Acces Token to install it, as it is currently available to the public on a limited basis.
- Move to Github setting page.
- Select Personal Access Token.and click Generate new token
- You check only
read:packages
and input token name. - Click Generate token button. Don't lost token before finish.
- Create
.npmrc
file in your use home directory with the following content.
@abeja-inc:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_TOKEN>
# Initialize your app
You can use any web framework
# Create .npmrc
file
Create a .npmrc
file in your npm installation root and put the following lines in it
registry=https://npm.pkg.github.com/abeja-inc
# Install SDK
Move your project root. You can install with npm command.
npm install @abeja-inc/annotation-js-sdk
# Use SDK in your application
The SDK has several Web Components to simplify the implementation of each page. In order to use it, you need to make it available in your browser first.
# Use with Webpack
Vue2 Example (opens new window)
# Register web components
import {
applyPolyfills,
defineCustomElements,
} from '@abeja-inc/annotation-js-sdk/loader'
applyPolyfills().then(() => {
defineCustomElements(window)
})
# Init template
import { annotation } from '@abeja-inc/annotation-js-sdk'
...
const app = annotation.app.init({
templateName: '<YOUR TEMPLATE NAME>',
dev: false
})