Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Latest commit

 

History

History
36 lines (25 loc) · 787 Bytes

installation.md

File metadata and controls

36 lines (25 loc) · 787 Bytes

Installation

Observer is usable in both browser and server environments.

Embed as script

<script src="https://unpkg.com/@web-native-js/observer/v1/dist/main.js"></script>

<script>
// The above tag loads Observer into a global "WebNative" object.
const Observer = window.WebNative.Observer;
</script>

Install via npm

$ npm i -g npm
$ npm i --save @web-native-js/observer

Import with the import keyword:

// Node-style import
import Observer from '@web-native-js/observer';

// Standard JavaScript import. (Actual path depends on where you installed Observer to.)
import Observer from './node_modules/@web-native-js/observer/v1/src/index.js';

Usage